summaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2021-03-29 11:04:45 +0200
committerJon Bratseth <bratseth@gmail.com>2021-03-29 11:04:45 +0200
commit6bc00c65350f465d3367c2fa45e9fdbc8b7a6a14 (patch)
treede978de383c130f7cb05de29506bf405c75e226c /container-search
parentf5d04998bfca09b8ae5daa747d55d73a50a62391 (diff)
Remove unsupported constructs
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g415
-rw-r--r--container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java8
2 files changed, 3 insertions, 20 deletions
diff --git a/container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 b/container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4
index b3bb7a3a6bb..ab3537ab4b9 100644
--- a/container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4
+++ b/container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4
@@ -341,21 +341,6 @@ argument[boolean in_select]
: expression[$in_select]
;
-// -------- join expressions ------------
-
-// Limit expression syntax for joins: A single equality test and one field from each source.
-// This means it can always turn the join into a query to one source, collecting all of the
-// keys from the results, and then a query to the other source (or querying the other source inline).
-// Does not support map or index references.
-
-joinExpression
- : joinDereferencedExpression EQ joinDereferencedExpression
- ;
-
-joinDereferencedExpression
- : namespaced_name
- ;
-
// --------- expressions ------------
expression [boolean select]
diff --git a/container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java b/container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java
index 1e17bedc88f..8f7e1d248cc 100644
--- a/container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java
+++ b/container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java
@@ -339,8 +339,8 @@ final class ProgramParser {
Preconditions.checkArgument(node instanceof Select_statementContext || node instanceof Insert_statementContext ||
node instanceof Update_statementContext || node instanceof Delete_statementContext);
- // SELECT^ select_field_spec select_source where? orderby? limit? offset? timeout?
- // select is the only place to define where/orderby/limit/offset and joins
+ // SELECT^ select_field_spec select_source where? orderby? limit? offset? timeout?
+ // select is the only place to define where/orderby/limit/offset
Scope scope = scopeParent.child();
ProjectionBuilder proj = null;
OperatorNode<SequenceOperator> source = null;
@@ -364,7 +364,6 @@ final class ProgramParser {
switch (getParseTreeIndex(sourceNode)) {
// ALL_SOURCE and MULTI_SOURCE are how FROM SOURCES
// *|source_name,... are parsed
- // They can't be used directly with the JOIN syntax at this time
case yqlplusParser.RULE_select_source_all: {
Location location = toLocation(scope, sourceNode.getChild(2));
source = OperatorNode.create(location, SequenceOperator.ALL);
@@ -1068,8 +1067,7 @@ final class ProgramParser {
throw new ProgramCompileException(toLocation(scope, parseTree),"Unknown child count " + parseTree.getChildCount() + " of " + parseTree.getText());
}
}
- case yqlplusParser.RULE_fieldref:
- case yqlplusParser.RULE_joinDereferencedExpression: {
+ case yqlplusParser.RULE_fieldref: {
// all in-scope data sources should be defined in scope
// the 'first' field in a namespaced reference must be:
// - a field name if (and only if) there is exactly one data source