From c9931b3b1f5409537bab14a2109cf4aad0700ae1 Mon Sep 17 00:00:00 2001 From: Ghislain Fourny Date: Thu, 21 Dec 2023 11:21:31 +0100 Subject: [PATCH] Fix test. --- .../org/rumbledb/parser/XQueryParser.java | 25 +++++++++++++------ .../DataFrames/GroupbyClause5.jq | 3 ++- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/rumbledb/parser/XQueryParser.java b/src/main/java/org/rumbledb/parser/XQueryParser.java index f737166a85..5af047f1f1 100644 --- a/src/main/java/org/rumbledb/parser/XQueryParser.java +++ b/src/main/java/org/rumbledb/parser/XQueryParser.java @@ -3,14 +3,25 @@ // Java header package org.rumbledb.parser; -import org.antlr.v4.runtime.atn.*; -import org.antlr.v4.runtime.dfa.DFA; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.misc.*; -import org.antlr.v4.runtime.tree.*; -import java.util.List; -import java.util.Iterator; import java.util.ArrayList; +import java.util.List; + +import org.antlr.v4.runtime.NoViableAltException; +import org.antlr.v4.runtime.Parser; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.RecognitionException; +import org.antlr.v4.runtime.RuntimeMetaData; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.Vocabulary; +import org.antlr.v4.runtime.VocabularyImpl; +import org.antlr.v4.runtime.atn.ATN; +import org.antlr.v4.runtime.atn.ATNDeserializer; +import org.antlr.v4.runtime.atn.ParserATNSimulator; +import org.antlr.v4.runtime.atn.PredictionContextCache; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.tree.ParseTreeVisitor; +import org.antlr.v4.runtime.tree.TerminalNode; @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) public class XQueryParser extends Parser { diff --git a/src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClause5.jq b/src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClause5.jq index 64f860404e..18a657d22b 100644 --- a/src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClause5.jq +++ b/src/test/resources/test_files/runtime-spark/DataFrames/GroupbyClause5.jq @@ -1,10 +1,11 @@ -(:JIQS: ShouldRun; Output="([ 1, { "guess" : "Bulgarian", "choices" : [ "Albanian", "Bulgarian", "Russian", "Ukrainian" ] }, { "guess" : "Bulgarian", "choices" : [ "Arabic", "Bulgarian", "Hebrew", "Spanish" ] } ], [ 2, { "guess" : "Arabic", "choices" : [ "Arabic", "Cantonese", "Maltese", "Samoan" ] }, { "guess" : "Arabic", "choices" : [ "Albanian", "Arabic", "Czech", "Dutch" ] } ])" :) +(:JIQS: ShouldRun; Output="([ 1, { "guess" : "Arabic", "choices" : [ "Arabic", "Cantonese", "Maltese", "Samoan" ] }, { "guess" : "Arabic", "choices" : [ "Albanian", "Arabic", "Czech", "Dutch" ] } ], [ 2, { "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"]})) group by $guess := $i.guess +order by $guess count $group_index return [$group_index, $i]