-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1163 from RumbleDB/TestFix
Test fix
- Loading branch information
Showing
8 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClause4.jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
(:JIQS: ShouldRun; Output="({ "$guess" : "Bulgarian", "$i" : [ { "guess" : "Bulgarian", "choices" : [ "Albanian", "Bulgarian", "Russian", "Ukrainian" ] }, { "guess" : "Bulgarian", "choices" : [ "Arabic", "Bulgarian", "Hebrew", "Spanish" ] } ] }, { "$guess" : "Arabic", "$i" : [ { "guess" : "Arabic", "choices" : [ "Arabic", "Cantonese", "Maltese", "Samoan" ] }, { "guess" : "Arabic", "choices" : [ "Albanian", "Arabic", "Czech", "Dutch" ] } ] })" :) | ||
(:JIQS: ShouldRun; Output="({ "$guess" : "Arabic", "$i" : [ { "guess" : "Arabic", "choices" : [ "Arabic", "Cantonese", "Maltese", "Samoan" ] }, { "guess" : "Arabic", "choices" : [ "Albanian", "Arabic", "Czech", "Dutch" ] } ] }, { "$guess" : "Bulgarian", "$i" : [ { "guess" : "Bulgarian", "choices" : [ "Albanian", "Bulgarian", "Russian", "Ukrainian" ] }, { "guess" : "Bulgarian", "choices" : [ "Arabic", "Bulgarian", "Hebrew", "Spanish" ] } ] })" :) | ||
for $i in parallelize(( | ||
{"guess": "Arabic", "choices": ["Arabic", "Cantonese", "Maltese", "Samoan"]}, | ||
{"guess": "Arabic", "choices": ["Albanian", "Arabic", "Czech", "Dutch"]}, | ||
{"guess": "Bulgarian", "choices": ["Albanian", "Bulgarian", "Russian", "Ukrainian"]}, | ||
{"guess": "Bulgarian", "choices": ["Arabic", "Bulgarian", "Hebrew", "Spanish"]})) | ||
let $guess := $i.guess | ||
group by $guess | ||
order by $guess | ||
return {"$guess": $guess, "$i": $i} | ||
|
||
(: test with no null or empty entries - grouping variable pre-defined with let :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClause8.jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
(:JIQS: ShouldRun; Output="(Czech, Serbian, Russian)" :) | ||
(:JIQS: ShouldRun; Output="(Czech, Russian, Serbian)" :) | ||
for $i in json-file("../../../queries/conf-ex.json", 10) | ||
group by $target := $i.target | ||
order by $target | ||
return $target | ||
|
||
(: variables defined in groupby are accessible all the way to and including the return clause:) |
3 changes: 2 additions & 1 deletion
3
src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClauseDate.jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
(:JIQS: ShouldRun; Output="(2004-04-12, 2004-04-12-05:00, -0045-01-01, 2004-04-12+14:00, 12004-04-12Z)" :) | ||
(:JIQS: ShouldRun; Output="(-0045-01-01, 2004-04-12+14:00, 2004-04-12, 2004-04-12-05:00, 12004-04-12Z)" :) | ||
for $j as date in parallelize((date("2004-04-12"), date("2004-04-12-05:00"), date("2004-04-12Z"), date("2004-04-12+14:00"), date("-0045-01-01"), date("12004-04-12Z"), date(()))) | ||
group by $j | ||
order by $j | ||
return $j |
3 changes: 2 additions & 1 deletion
3
src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClauseDateTime.jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
(:JIQS: ShouldRun; Output="(2004-04-12T13:20:00+14:00, 2004-04-12T13:20:15.500, 2004-04-12T13:20:00, 2001-12-13T00:00:00, 2004-04-12T13:20:00-05:00, 2000-12-12T12:12:12Z)" :) | ||
(:JIQS: ShouldRun; Output="(2000-12-12T12:12:12Z, 2001-12-13T00:00:00, 2004-04-12T13:20:00+14:00, 2004-04-12T13:20:00, 2004-04-12T13:20:15.500, 2004-04-12T13:20:00-05:00)" :) | ||
for $j as dateTime in parallelize((dateTime("2004-04-12T13:20:00"), dateTime("2000-12-12T12:12:12Z"), dateTime("2004-04-12T13:20:15.5"), dateTime("2004-04-12T13:20:00-05:00"), dateTime("2004-04-12T13:20:00Z"), dateTime("2004-04-12T13:20:00+14:00"), dateTime("2001-12-12T24:00:00"), dateTime(()))) | ||
group by $j | ||
order by $j | ||
return $j |
3 changes: 2 additions & 1 deletion
3
src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClauseHexBinary.jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
(:JIQS: ShouldRun; Output="(AABB, 0123456789ABCDEF)" :) | ||
(:JIQS: ShouldRun; Output="(0123456789ABCDEF, AABB)" :) | ||
for $j as hexBinary in parallelize((hexBinary("0123456789abcdef"), hexBinary("AaBb"), hexBinary("aAbB"), hexBinary(()))) | ||
group by $j | ||
order by string($j) | ||
return $j |
3 changes: 2 additions & 1 deletion
3
src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClauseTime.jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
(:JIQS: ShouldRun; Output="(12:12:12Z, 13:20:00-05:00, 13:20:00, 13:20:30.555, 00:00:00)" :) | ||
(:JIQS: ShouldRun; Output="(00:00:00, 12:12:12Z, 13:20:00, 13:20:30.555, 13:20:00-05:00)" :) | ||
for $j as time in parallelize((time("12:12:12Z"), time("13:20:00"), time("13:20:30.5555"), time("13:20:00-05:00"), time("13:20:00Z"), time("00:00:00"), time("24:00:00"), time(()))) | ||
group by $j | ||
order by $j | ||
return $j |
3 changes: 2 additions & 1 deletion
3
src/test/resources/test_files/runtime-spark/FLWOROutsideVariable1.jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
(:JIQS: ShouldRun; Output="({ "k" : 1, "i" : 1 }, { "k" : 0, "i" : 1 }, { "k" : 1, "i" : 2 }, { "k" : 0, "i" : 2 })" :) | ||
(:JIQS: ShouldRun; Output="({ "k" : 0, "i" : 1 }, { "k" : 1, "i" : 1 }, { "k" : 0, "i" : 2 }, { "k" : 1, "i" : 2 })" :) | ||
|
||
for $i in 1 to 2 | ||
return | ||
for $j in parallelize(1 to 4) | ||
let $k := $j mod 2 | ||
group by $k | ||
order by $k | ||
return { "k" : $k, "i" : $i } |