commit | 5075a02720660a9c4cec3b8f0dcf2b42f75f1152 | [log] [tgz] |
---|---|---|
author | Florent Guillaume <fguillaume@apache.org> | Tue Nov 03 19:13:33 2009 +0000 |
committer | Florent Guillaume <fguillaume@apache.org> | Tue Nov 03 19:13:33 2009 +0000 |
tree | dc4716e6a58e552b94fdb72be1da1147040da61e | |
parent | 89cec978b27ebf19972d7db68b16f5c88a9f0da7 [diff] |
Always put multi-valued column reference last in BIN_OP_ANY git-svn-id: https://svn.apache.org/repos/asf/incubator/chemistry/branches/0.62@832516 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g b/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g index 0e36676..0d09636 100644 --- a/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g +++ b/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g
@@ -205,9 +205,9 @@ quantified_in_predicate: ANY multi_valued_column_reference ( NOT IN LPAR in_value_list RPAR - -> ^(BIN_OP_ANY NOT_IN multi_valued_column_reference in_value_list) + -> ^(BIN_OP_ANY NOT_IN in_value_list multi_valued_column_reference) | IN LPAR in_value_list RPAR - -> ^(BIN_OP_ANY IN multi_valued_column_reference in_value_list) + -> ^(BIN_OP_ANY IN in_value_list multi_valued_column_reference) ) ;
diff --git a/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite b/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite index 4e331ea..8076012 100644 --- a/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite +++ b/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
@@ -91,7 +91,7 @@ "foo NOT IN ( 1, 2, 3)" -> (BIN_OP NOT_IN (COL foo) (LIST 1 2 3)) quantified_in_predicate: -"ANY foo IN ('a', 1)" -> (BIN_OP_ANY IN (COL foo) (LIST 'a' 1)) +"ANY foo IN ('a', 1)" -> (BIN_OP_ANY IN (LIST 'a' 1) (COL foo)) comparison_predicate: "foo = 1" -> (BIN_OP = (COL foo) 1)