Skip to content

Commit 2f52348

Browse files
committed
Merge branch '3.8-dev'
2 parents 5a6b8b3 + 61bcf0c commit 2f52348

File tree

5 files changed

+79
-6
lines changed

5 files changed

+79
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ target/
66
*.DS_Store
77
*.ipr
88
*.swp
9+
TestResults/
910
buildAll.sh
1011
build_output.txt
1112
.classpath

docs/src/dev/future/index.asciidoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,12 @@ story.
161161
|=========================================================
162162
|Proposal |Description |Targets |Resolved
163163
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-equality-1.asciidoc[Proposal 1] |Equality, Equivalence, Comparability and Orderability Semantics - Documents existing Gremlin semantics along with clarifications for ambiguous behaviors and recommendations for consistency. |3.6.0 |Y
164-
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-arrow-flight-2[Proposal 2] |Gremlin Arrow Flight. |Future |N
165-
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-3-remove-closures[Proposal 3] |Removing the Need for Closures/Lambda in Gremlin |3.7.0 |Y
166-
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-transaction-4[Proposal 4] |TinkerGraph Transaction Support |3.7.0 |Y
167-
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-scoping-5[Proposal 5] |Lazy vs. Eager Evaluation|3.8.0 |N
168-
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-scoping-5[Proposal 6] |asNumber() Step|3.8.0 |N
164+
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-arrow-flight-2.asciidoc[Proposal 2] |Gremlin Arrow Flight. |Future |N
165+
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-3-remove-closures.asciidoc[Proposal 3] |Removing the Need for Closures/Lambda in Gremlin |3.7.0 |Y
166+
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-transaction-4.asciidoc[Proposal 4] |TinkerGraph Transaction Support |3.7.0 |Y
167+
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-scoping-5.asciidoc[Proposal 5] |Lazy vs. Eager Evaluation|3.8.0 |N
168+
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-asnumber-step-6.asciidoc[Proposal 6] |asNumber() Step|3.8.0 |N
169+
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-asbool-step-7.asciidoc[Proposal 7] |asBool() Step|3.8.0 |N
169170
|=========================================================
170171
171172
= Appendix
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
////
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
////
17+
18+
image::apache-tinkerpop-logo.png[width=500,link="https://tinkerpop.apache.org"]
19+
20+
*x.y.z - Proposal 7*
21+
22+
== asBool() Step
23+
24+
=== Motivation
25+
26+
Given the additions of the `asString()` and `asDate()` steps in the 3.7 line, this proposal seeks to bridge another gap in language functionality, which is boolean parsing.
27+
28+
=== Definition
29+
30+
The `asBool()` step will convert the incoming traverser into a Boolean value.
31+
32+
If the incoming traverser is `null`, then `null` will be returned.
33+
34+
The incoming traverser can be of type:
35+
36+
*Boolean* - No change will happen, the Boolean will be returned as is.
37+
38+
*Number* - All non-zero values are considered `true`, zero values are considered `false`, `NaN` and `null` values are considered `null`, for example:
39+
[cols=",",options="header",]
40+
|===
41+
|Numerical Value |Boolean Value
42+
|3.14 |true
43+
|1 |true
44+
|0 |false
45+
|0.0 |false
46+
|-0.0 |false
47+
|-1 |true
48+
|-3.14 |true
49+
|NaN |null
50+
|null |null
51+
|===
52+
53+
*String* - Strings will not be parsable into bool, except boolean strings. Non-parsable strings will return `null`:
54+
[cols=",",options="header",]
55+
|===
56+
|Sting Value |Boolean Value
57+
|"true" |true
58+
|"false" |false
59+
|"True" |true
60+
|"False" |false
61+
|"TRUE" |true
62+
|"FALSE" |false
63+
|"trUE" |true
64+
|"faLSe" |false
65+
|"null"|null
66+
|"1" |null
67+
|"hello" |null
68+
|===
69+
70+
*All other types* - Invalid input into the step, an `IllegalArgumentException` will be thrown.

gremlin-dotnet/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ services:
5555
- DOCKER_ENVIRONMENT=true
5656
working_dir: /gremlin-dotnet
5757
command: >
58-
bash -c "dotnet test ./Gremlin.Net.sln -c Release;
58+
bash -c "dotnet tool update -g dotnet-trx; dotnet test ./Gremlin.Net.sln -c Release --logger trx; /root/.dotnet/tools/trx;
5959
EXIT_CODE=$$?; chown -R `stat -c "%u:%g" .` .; exit $$EXIT_CODE"
6060
depends_on:
6161
gremlin-server-test-dotnet:

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ limitations under the License.
492492
<exclude>**/*.graffle</exclude>
493493
<exclude>**/*.svg</exclude>
494494
<exclude>**/goal.txt</exclude>
495+
<exclude>**/*.trx</exclude>
495496
<exclude>**/src/main/resources/META-INF/services/**</exclude>
496497
<exclude>**/src/test/resources/mockito-extensions/**</exclude>
497498
<exclude>**/src/test/resources/META-INF/services/**</exclude>

0 commit comments

Comments
 (0)