geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adon...@apache.org
Subject [5/5] geode git commit: GEODE-165: Removed OQL generated files and added the target into geode-core/build.gradle.
Date Thu, 22 Dec 2016 05:41:43 GMT
GEODE-165: Removed OQL generated files and added the target into geode-core/build.gradle.

GEODE-165 : Updating spotless configuration to exclude 'generated-src' directory.


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/93d4455d
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/93d4455d
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/93d4455d

Branch: refs/heads/develop
Commit: 93d4455d861413e5bb922d06d4775929b39c6c81
Parents: d30e9ab
Author: adongre <adongre@apache.org>
Authored: Fri Dec 16 14:17:10 2016 +0530
Committer: adongre <adongre@apache.org>
Committed: Thu Dec 22 10:56:52 2016 +0530

----------------------------------------------------------------------
 build.gradle                                    |    4 +
 geode-core/build.gradle                         |    3 +
 .../geode/cache/query/internal/parse/oql.g      | 1195 ++++++
 .../query/internal/AbstractCompiledValue.java   |    2 +-
 .../geode/cache/query/internal/CompiledIn.java  |    2 +-
 .../cache/query/internal/CompiledLike.java      |    2 -
 .../query/internal/CompiledSortCriterion.java   |    6 -
 .../query/internal/CompositeGroupJunction.java  |    1 -
 .../geode/cache/query/internal/DerivedInfo.java |    5 -
 .../geode/cache/query/internal/IndexInfo.java   |    2 -
 .../geode/cache/query/internal/PathUtils.java   |    2 +-
 .../geode/cache/query/internal/QCompiler.java   |   11 +-
 .../geode/cache/query/internal/QueryUtils.java  |    2 +-
 .../cache/query/internal/RangeJunction.java     |    2 +-
 .../query/internal/index/AbstractIndex.java     |    4 +-
 .../index/FunctionalIndexCreationHelper.java    |    3 -
 .../cache/query/internal/index/HashIndex.java   |    3 +-
 .../query/internal/index/MapIndexStore.java     |    4 -
 .../cache/query/internal/index/RangeIndex.java  |    1 -
 .../cache/query/internal/parse/OQLLexer.java    | 3471 -----------------
 .../internal/parse/OQLLexerTokenTypes.java      |  156 -
 .../query/internal/parse/OQLLexerTokenTypes.txt |  147 -
 .../cache/query/internal/parse/OQLParser.java   | 3650 ------------------
 .../geode/cache/query/internal/parse/oql.g      | 1195 ------
 .../query/functional/FunctionJUnitTest.java     |    2 +-
 .../CompiledAggregateFunctionJUnitTest.java     |    2 +-
 .../CompiledJunctionInternalsJUnitTest.java     |    2 +-
 .../query/internal/QCompilerJUnitTest.java      |    2 +-
 .../SelectResultsComparatorJUnitTest.java       |    2 +-
 .../internal/index/RangeIndexAPIJUnitTest.java  |    2 +-
 .../query/internal/types/TypeUtilTest.java      |    2 +-
 gradle/rat.gradle                               |    6 -
 32 files changed, 1219 insertions(+), 8674 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 360310f..3dcdf1e 100755
--- a/build.gradle
+++ b/build.gradle
@@ -91,6 +91,10 @@ subprojects {
   spotless {
     lineEndings = 'unix';
     java {
+      target project.fileTree(project.projectDir) {
+        include '**/*.java'
+        exclude '**/generated-src/**'
+      }
       eclipseFormatFile "${rootProject.projectDir}/etc/eclipse-java-google-style.xml"
     }
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/build.gradle
----------------------------------------------------------------------
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 067bafc..28085be 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -15,6 +15,9 @@
  * limitations under the License.
  */
 
+
+apply plugin: 'antlr'
+
 sourceSets {
   jca {
     compileClasspath += configurations.compile

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/antlr/org/apache/geode/cache/query/internal/parse/oql.g
----------------------------------------------------------------------
diff --git a/geode-core/src/main/antlr/org/apache/geode/cache/query/internal/parse/oql.g b/geode-core/src/main/antlr/org/apache/geode/cache/query/internal/parse/oql.g
new file mode 100644
index 0000000..a743752
--- /dev/null
+++ b/geode-core/src/main/antlr/org/apache/geode/cache/query/internal/parse/oql.g
@@ -0,0 +1,1195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+**  oql.g
+**
+** Built with Antlr 2.7.4
+**   java antlr.Tool oql.g
+*/
+
+header {
+package org.apache.geode.cache.query.internal.parse;
+import java.util.*;
+import org.apache.geode.cache.query.internal.types.*;
+}
+
+options {
+    language="Java";
+}
+
+class OQLLexer extends Lexer ;
+options {
+    k=2;
+    charVocabulary = '\u0000'..'\uFFFE';
+    testLiterals=false;     // don't automatically test for literals
+    caseSensitive=false;
+    caseSensitiveLiterals = false;
+    defaultErrorHandler = false;
+}
+
+{
+    static {
+        // Set up type names for verbose AST printing
+        antlr.BaseAST.setVerboseStringConversion(true, OQLParser._tokenNames);
+    }
+
+    protected Token makeToken(int t) {
+        Token tok = super.makeToken(t);
+        if (tok.getType() == EOF) tok.setText("EOF");
+        if (tok.getText() == null) {
+          tok.setText("(no text)");
+        }
+        return tok;
+    }
+}    
+
+
+        /* punctuation */
+TOK_RPAREN  :       ')'             ;
+TOK_LPAREN  :       '('             ;
+TOK_COMMA   :       ','             ;
+TOK_SEMIC   :       ';'             ;
+TOK_DOTDOT  :       ".."            ;
+TOK_COLON   :       ':'             ;
+TOK_DOT     :       '.'             ;
+TOK_INDIRECT:       '-' '>'         { $setType(TOK_DOT); } ;
+TOK_CONCAT  :       '|' '|'         ;
+TOK_EQ      :       '='             ;
+TOK_PLUS    :       '+'             ;
+TOK_MINUS   :       '-'             ;
+TOK_SLASH   :       '/'             ;
+TOK_STAR    :       '*'             ;
+TOK_LE      :       '<' '='         ;
+TOK_GE      :       '>' '='         ;
+TOK_NE      :       '<' '>'         ;
+TOK_NE_ALT  :       '!' '='         { $setType(TOK_NE); }  ;
+TOK_LT      :       '<'             ;
+TOK_GT      :       '>'             ;
+TOK_LBRACK  :       '['             ;
+TOK_RBRACK  :       ']'             ;
+TOK_DOLLAR  :       '$'             ;
+
+/* Character Classes */
+protected
+LETTER : ('\u0061'..'\u007a' |
+       '\u00c0'..'\u00d6' |
+       '\u00a1'..'\u00bf' |
+       '\u00d8'..'\u00f6' |
+       '\u00f8'..'\u00ff' |
+       '\u0100'..'\u065f' |
+       '\u066a'..'\u06ef' |
+       '\u06fa'..'\u0965' |
+       '\u0970'..'\u09e5' |
+       '\u09f0'..'\u0a65' |
+       '\u0a70'..'\u0ae5' |
+       '\u0af0'..'\u0b65' |
+       '\u0b70'..'\u0be6' |
+       '\u0bf0'..'\u0c65' |
+       '\u0c70'..'\u0ce5' |
+       '\u0cf0'..'\u0d65' |
+       '\u0d70'..'\u0e4f' |
+       '\u0e5a'..'\u0ecf' |
+       '\u0eda'..'\u103f' |
+       '\u104a'..'\u1fff' |
+       '\u2000'..'\u206f' |       
+       '\u3040'..'\u318f' |
+       '\u3300'..'\u337f' |
+       '\u3400'..'\u3d2d' |
+       '\u4e00'..'\u9fff' |
+       '\uf900'..'\ufaff')
+    ;
+
+protected
+DIGIT : ('\u0030'..'\u0039' |
+       '\u0660'..'\u0669' |
+       '\u06f0'..'\u06f9' |
+       '\u0966'..'\u096f' |
+       '\u09e6'..'\u09ef' |
+       '\u0a66'..'\u0a6f' |
+       '\u0ae6'..'\u0aef' |
+       '\u0b66'..'\u0b6f' |
+       '\u0be7'..'\u0bef' |
+       '\u0c66'..'\u0c6f' |
+       '\u0ce6'..'\u0cef' |
+       '\u0d66'..'\u0d6f' |
+       '\u0e50'..'\u0e59' |
+       '\u0ed0'..'\u0ed9' |
+       '\u1040'..'\u1049')
+    ;
+
+protected
+ALL_UNICODE : ('\u0061'..'\ufffd')	
+    ;
+
+/*
+ * Names
+ */
+protected
+NameFirstCharacter:
+        ( LETTER | '_' )
+    ;
+
+protected
+NameCharacter:
+        ( LETTER | '_' | DIGIT | '$') // an internal $ is used for internal use identifiers
+    ;
+
+protected
+RegionNameCharacter:
+        ( ALL_UNICODE | '_' | DIGIT | '+' | '-' | ':' | '#' | '@' | '$') // an internal $ is used for internal use identifiers
+    ;
+
+QuotedIdentifier
+       options {testLiterals=false;}
+            :
+    
+            '"'! NameFirstCharacter ( NameCharacter )* '"'!
+    ;
+
+
+
+Identifier
+        options {testLiterals=true;}
+            :
+
+            NameFirstCharacter ( NameCharacter )*
+    ;
+
+
+
+RegionPath :  ( ( (TOK_SLASH ( RegionNameCharacter )+ )+ ) | 
+			  ( (TOK_SLASH StringLiteral )+ ) ) 
+    ;
+
+
+/* Numbers */
+// a numeric literal
+NUM_INT
+	{boolean isDecimal=false; Token t=null;}
+    :   (	'0' {isDecimal = true;} // special case for just '0'
+			(	'x'
+				(						// hex
+					// the 'e'|'E' and float suffix stuff look
+					// like hex digits, hence the (...)+ doesn't
+					// know when to stop: ambig.  ANTLR resolves
+					// it correctly by matching immediately.  It
+					// is therefor ok to hush warning.
+					options {
+						warnWhenFollowAmbig=false;
+					}
+				:	HEX_DIGIT
+				)+
+
+			|	//float or double with leading zero
+				(('0'..'9')+ ('.'|EXPONENT|FLOAT_SUFFIX)) => ('0'..'9')+
+
+			|	('0'..'7')+					// octal
+			)?
+		|	('1'..'9') ('0'..'9')*  {isDecimal=true;}		// non-zero decimal
+		)
+		(	'l' { _ttype = NUM_LONG; }
+
+		// only check to see if it's a float if looks like decimal so far
+		|	{isDecimal}?
+            (   '.' ('0'..'9')* (EXPONENT)? (f2:FLOAT_SUFFIX {t=f2;})?
+            |   EXPONENT (f3:FLOAT_SUFFIX {t=f3;})?
+            |   f4:FLOAT_SUFFIX {t=f4;}
+            )
+            {
+			if (t != null && t.getText().toUpperCase() .indexOf('F') >= 0) {
+                _ttype = NUM_FLOAT;
+			}
+            else {
+	           	_ttype = NUM_DOUBLE; // assume double
+			}
+			}
+        )?
+	;
+
+
+// a couple protected methods to assist in matching floating point numbers
+protected
+EXPONENT
+	:	'e' ('+'|'-')? ('0'..'9')+
+	;
+
+
+protected
+FLOAT_SUFFIX
+	:	'f'|'d'
+	;
+
+// hexadecimal digit
+protected
+HEX_DIGIT
+	:	('0'..'9'| 'a'..'f')
+	;
+
+
+protected
+QUOTE
+        :       '\''
+        ;
+
+StringLiteral :
+        QUOTE!
+        (
+            QUOTE QUOTE!
+        |   '\n'                { newline(); }
+        |   ~( '\'' | '\n' )
+        )*
+        QUOTE!
+
+    ;
+
+
+// Whitespace -- ignored
+WS	:	(	' '
+		|	'\t'
+		|	'\f'
+			// handle newlines
+		|	(	options {generateAmbigWarnings=false;}
+			:	"\r\n"  // Evil DOS
+			|	'\r'    // Macintosh
+			|	'\n'    // Unix (the right way)
+			)
+			{ newline(); }
+		)+
+		{ _ttype = Token.SKIP; }
+	;
+
+
+// Single-line comments
+SL_COMMENT
+	:	"--"
+		(~('\n'|'\r'))* ('\n'|'\r'('\n')?)?
+		{$setType(Token.SKIP); newline();}
+	;
+
+// multiple-line comments
+ML_COMMENT
+	:	"/*"
+		(	/*	'\r' '\n' can be matched in one alternative or by matching
+				'\r' in one iteration and '\n' in another.  I am trying to
+				handle any flavor of newline that comes in, but the language
+				that allows both "\r\n" and "\r" and "\n" to all be valid
+				newline is ambiguous.  Consequently, the resulting grammar
+				must be ambiguous.  I'm shutting this warning off.
+			 */
+			options {
+				generateAmbigWarnings=false;
+			}
+		:
+			{ LA(2)!='/' }? '*'
+		|	'\r' '\n'		{newline();}
+		|	'\r'			{newline();}
+		|	'\n'			{newline();}
+		|	~('*'|'\n'|'\r')
+		)*
+		"*/"
+		{$setType(Token.SKIP);}
+	;
+
+
+
+
+/***************************** OQL PARSER *************************************/
+
+class OQLParser
+extends Parser("org.apache.geode.cache.query.internal.parse.UtilParser");
+
+options {
+    buildAST = true;
+    k = 2;
+    codeGenMakeSwitchThreshold = 3;
+    codeGenBitsetTestThreshold = 4;
+    defaultErrorHandler = false;
+}
+
+tokens {
+    QUERY_PROGRAM;
+    QUALIFIED_NAME;
+    QUERY_PARAM;
+    ITERATOR_DEF;
+    PROJECTION_ATTRS;
+    PROJECTION;
+    TYPECAST;
+    COMBO;
+    METHOD_INV;
+    POSTFIX; 
+    OBJ_CONSTRUCTOR;
+    IMPORTS;
+    SORT_CRITERION;
+    LIMIT;
+    HINT;
+    AGG_FUNC;
+    SUM;
+    AVG;
+    COUNT;
+    MAX;
+    MIN;
+}
+
+queryProgram :
+		( traceCommand )?
+       	( 
+       
+       		( declaration ( TOK_SEMIC! declaration )* ( TOK_SEMIC! query ) ) (TOK_SEMIC!)?
+        	|   
+        	query (TOK_SEMIC!)?
+       	)
+       	EOF!
+        { #queryProgram =
+          #([QUERY_PROGRAM, "queryProgram",
+            "org.apache.geode.cache.query.internal.parse.GemFireAST"],
+            #queryProgram); }
+    ;
+
+traceCommand:
+		( 	
+			TOK_LT!
+			"trace"^<AST=org.apache.geode.cache.query.internal.parse.ASTTrace>
+			TOK_GT!
+		)
+	;
+     
+
+loneFromClause :
+    iteratorDef
+        (
+            TOK_COMMA!
+            iteratorDef
+        )* EOF!
+    { #loneFromClause =
+          #([LITERAL_from, "from",
+            "org.apache.geode.cache.query.internal.parse.ASTCombination"],
+            #loneFromClause); }
+    ;
+
+loneProjectionAttributes :
+    projectionAttributes EOF!
+    ;
+
+declaration :
+
+            defineQuery
+        |   importQuery
+        |   undefineQuery
+        |   paramTypeDecl
+
+    ;
+
+importQuery :
+
+        "import"^<AST=org.apache.geode.cache.query.internal.parse.ASTImport>
+        qualifiedName
+        (
+            "as" identifier
+        )?
+
+    ;
+
+loneImports :
+        importQuery ( TOK_SEMIC! importQuery )*
+        (TOK_SEMIC!)?
+        EOF!
+        // combine into a single node
+        { #loneImports = #([IMPORTS, "imports",
+            "org.apache.geode.cache.query.internal.parse.GemFireAST"],
+                #loneImports); }
+    ;
+
+paramTypeDecl :
+    
+        "declare"^ (queryParam) (TOK_COMMA! queryParam)* type
+    ;
+        
+
+qualifiedName :
+
+        identifier
+        (
+            TOK_DOT!
+            identifier
+        )*
+    ;
+
+
+defineQuery :
+
+        "define"^
+            ( "query"! )?
+        identifier
+
+        (
+            TOK_LPAREN!
+            type
+            identifier
+            (
+                TOK_COMMA!
+                type
+                identifier
+            )*
+            TOK_RPAREN!
+        )?
+
+        "as"!
+        query
+    ;
+
+undefineQuery :
+
+        "undefine"^
+        ( "query"! )?
+        identifier
+    ;
+
+query :
+
+        (
+            selectExpr
+        |   expr
+        )
+    ;
+
+selectExpr :
+		( hintCommand )?
+        "select"^<AST=org.apache.geode.cache.query.internal.parse.ASTSelect>
+
+        (
+            // ambig. betweed this distinct and a distinct conversion expr
+            // the first distinct keyword here must be for the select,
+            // so take adv. of greedy and turn off warning
+            options {
+                warnWhenFollowAmbig = false;
+            } :
+
+            "distinct" <AST=org.apache.geode.cache.query.internal.parse.ASTDummy>
+            | "all" <AST=org.apache.geode.cache.query.internal.parse.ASTDummy>
+        )?
+
+        
+		(			
+          projectionAttributes
+		)
+        fromClause
+        ( whereClause )?
+        ( groupClause )?
+        ( orderClause )?
+        ( limitClause )?
+    ;
+
+fromClause :
+
+        "from"^<AST=org.apache.geode.cache.query.internal.parse.ASTCombination>
+        iteratorDef
+        (
+            TOK_COMMA!
+            iteratorDef
+        )*
+    ;
+
+iteratorDef! :
+
+            (identifier "in" ) =>
+
+            id1:identifier
+            "in"!
+            ex1:expr ( "type"! t1:type )?
+            { #iteratorDef = #([ITERATOR_DEF, "iterDef", "org.apache.geode.cache.query.internal.parse.ASTIteratorDef"], #ex1, #id1, #t1); }
+
+        |   ex2:expr
+            (
+                ( "as"! )?
+                id2:identifier
+            )?
+            ( "type"! t2:type )?
+
+            { #iteratorDef = #([ITERATOR_DEF, "iterDef", "org.apache.geode.cache.query.internal.parse.ASTIteratorDef"], #ex2, #id2, #t2); }
+    ;
+
+whereClause :
+
+        "where"! expr
+    ;
+    
+limitClause! :
+
+        "limit" (TOK_DOLLAR NUM_INT
+        { #limitClause = #([LIMIT, "limitParam",
+               "org.apache.geode.cache.query.internal.parse.ASTParameter"],
+                   #NUM_INT); }
+         | n:NUM_INT{ #limitClause =#[LIMIT,n.getText(),"org.apache.geode.cache.query.internal.parse.ASTLimit"] ; })
+    ;
+
+projectionAttributes :
+
+        (
+            projection
+            (
+                TOK_COMMA!
+                projection
+            )*
+            { #projectionAttributes = #([PROJECTION_ATTRS, "projectionAttrs",
+                "org.apache.geode.cache.query.internal.parse.ASTCombination"],
+                #projectionAttributes); }
+
+        |   TOK_STAR <AST=org.apache.geode.cache.query.internal.parse.ASTDummy>
+        )
+    ;
+
+projection!{ AST node  = null;}:
+        
+            lb1:identifier TOK_COLON!  ( tok1:aggregateExpr{node = #tok1;} | tok2:expr{node = #tok2;})
+            { #projection = #([PROJECTION, "projection",
+            "org.apache.geode.cache.query.internal.parse.ASTProjection"],  node, #lb1); } 
+        |
+            (tok3:aggregateExpr{node = #tok3;} | tok4:expr{node = #tok4;})
+            (
+                "as"
+                lb2: identifier
+            )?
+            { #projection = #([PROJECTION, "projection",
+            "org.apache.geode.cache.query.internal.parse.ASTProjection"], node, #lb2); }
+    ;
+
+
+            
+
+groupClause :
+
+        "group"^<AST=org.apache.geode.cache.query.internal.parse.ASTGroupBy>
+        "by"!  groupByList
+
+        (
+            "having"!
+            expr
+        )?
+    ;
+    
+hintCommand :
+		 	
+			TOK_LT!
+			"hint"^<AST=org.apache.geode.cache.query.internal.parse.ASTHint>
+			hintIdentifier
+			(
+			  TOK_COMMA! hintIdentifier
+			)*
+			TOK_GT!
+		
+	;
+
+      
+hintIdentifier :
+ 	n:StringLiteral{ #hintIdentifier =#[HINT,n.getText(),"org.apache.geode.cache.query.internal.parse.ASTHintIdentifier"] ; }       
+;
+
+orderClause :
+
+        "order"^<AST=org.apache.geode.cache.query.internal.parse.ASTOrderBy>
+        "by"!
+        sortCriterion
+        (
+            TOK_COMMA! sortCriterion
+        )*
+    ;
+
+sortCriterion :
+
+        tok:expr { #sortCriterion = #([SORT_CRITERION, "asc", "org.apache.geode.cache.query.internal.parse.ASTSortCriterion"],
+            tok); }        
+        (
+            "asc"! {#sortCriterion.setText("asc");}
+        |   "desc"! {#sortCriterion.setText("desc");}
+
+        )?
+    ;
+
+expr :
+
+        castExpr
+
+     ;
+
+
+castExpr
+	:	
+
+        // Have to backtrack to see if operator follows.  If no operator
+        // follows, it's a typecast.  No semantic checking needed to parse.
+        // if it _looks_ like a cast, it _is_ a cast; else it's a "(expr)"
+    	(TOK_LPAREN type TOK_RPAREN castExpr)=>
+        lp:TOK_LPAREN^<AST=org.apache.geode.cache.query.internal.parse.ASTTypeCast>
+                {#lp.setType(TYPECAST); #lp.setText("typecast");}
+            type TOK_RPAREN!
+        castExpr
+
+    |	orExpr
+	;
+
+orExpr
+      { boolean cmplx = false; } :
+       
+            orelseExpr ( "or"! orelseExpr  { cmplx = true; } )*
+       { if (cmplx) {
+            #orExpr = #([LITERAL_or, "or",
+                    "org.apache.geode.cache.query.internal.parse.ASTOr"],
+                #orExpr); } }
+      ;
+
+orelseExpr 
+       { boolean cmplx = false; } :
+            andExpr ( "orelse"! andExpr { cmplx = true; } )*
+       { if (cmplx) { #orelseExpr = #([LITERAL_orelse, "or"], #orelseExpr); } }
+      ;
+
+
+andExpr 
+        { boolean cmplx = false; } :
+           quantifierExpr ( "and"! quantifierExpr { cmplx = true; } )*
+        { if (cmplx) {
+            #andExpr = #([LITERAL_and, "and",
+                    "org.apache.geode.cache.query.internal.parse.ASTAnd"],
+                    #andExpr); } }
+    ;
+
+quantifierExpr :
+
+            "for"^
+            "all"!
+            inClause TOK_COLON! andthenExpr
+
+        |   
+            ("exists" identifier "in" ) => 
+            "exists"^
+            inClause
+            TOK_COLON! andthenExpr
+
+        |   andthenExpr
+
+    ;
+
+
+inClause :
+            identifier "in"! expr
+         ;
+
+
+
+andthenExpr 
+         { boolean cmplx = false; } :
+            equalityExpr ( "andthen"! equalityExpr { cmplx = true; } )*
+            { if (cmplx) { #andthenExpr = #([LITERAL_andthen, "andthen"], #andthenExpr); } }
+         ;
+
+
+equalityExpr :
+
+            relationalExpr
+
+            (   
+                (   (
+                        TOK_EQ^<AST=org.apache.geode.cache.query.internal.parse.ASTCompareOp>
+                    |   TOK_NE^<AST=org.apache.geode.cache.query.internal.parse.ASTCompareOp>
+                    )
+                    (   "all"^
+                    |   "any"^
+                    |   "some"^
+                    )?
+                relationalExpr )+
+    
+            |   (  "like"^<AST=org.apache.geode.cache.query.internal.parse.ASTLike>
+                relationalExpr )*
+            )
+    ;
+
+relationalExpr :
+
+        additiveExpr
+        (
+            (
+                TOK_LT^<AST=org.apache.geode.cache.query.internal.parse.ASTCompareOp>
+            |   TOK_GT^<AST=org.apache.geode.cache.query.internal.parse.ASTCompareOp>
+            |   TOK_LE^<AST=org.apache.geode.cache.query.internal.parse.ASTCompareOp>
+            |   TOK_GE^<AST=org.apache.geode.cache.query.internal.parse.ASTCompareOp>
+            )
+
+            (
+                // Simple comparison of expressions
+                additiveExpr
+
+                // Comparison of queries
+            |   (
+                    "all"^
+                |   "any"^
+                |   "some"^
+                )
+                additiveExpr
+            )
+        )*
+    ;
+
+additiveExpr :
+
+        multiplicativeExpr
+        (
+            (
+                TOK_PLUS^
+            |   TOK_MINUS^
+            |   TOK_CONCAT^
+            |   "union"^
+            |   "except"^
+            )
+            multiplicativeExpr
+        )*
+    ;
+
+multiplicativeExpr :
+
+        inExpr
+        (
+            (
+                TOK_STAR^
+            |   TOK_SLASH^
+            |   "mod"^
+            |   "intersect"^
+            )
+            inExpr
+        )*
+    ;
+
+inExpr :
+
+        unaryExpr
+        (
+            "in"^<AST=org.apache.geode.cache.query.internal.parse.ASTIn> unaryExpr
+        )?
+    ;
+
+unaryExpr :
+
+        (
+            (
+                TOK_PLUS!
+            |   TOK_MINUS^<AST=org.apache.geode.cache.query.internal.parse.ASTUnary>
+            |   "abs"^
+            |   "not"^<AST=org.apache.geode.cache.query.internal.parse.ASTUnary>
+            )
+        )*
+        postfixExpr
+
+    ;
+
+postfixExpr
+         { boolean cmplx = false; } :
+            primaryExpr
+
+            (   
+                TOK_LBRACK!
+                    index TOK_RBRACK!
+                { cmplx = true; }
+    
+            |   ( TOK_DOT! | TOK_INDIRECT! ) 
+                  (  methodInvocation[false]
+                   | identifier )
+                { cmplx = true; }
+            )*
+            { if (cmplx) {
+                #postfixExpr = #([POSTFIX, "postfix",
+                   "org.apache.geode.cache.query.internal.parse.ASTPostfix"],
+                    #postfixExpr);
+              }
+            }
+
+    ;
+
+methodInvocation! [boolean implicitReceiver] :
+    
+            methodName:identifier args:argList  
+            { #methodInvocation =
+                #([METHOD_INV, "methodInv",
+                    "org.apache.geode.cache.query.internal.parse.ASTMethodInvocation"],
+                  #methodName, #args); 
+              ((ASTMethodInvocation)#methodInvocation).setImplicitReceiver(implicitReceiver); }
+        ;
+
+index :
+
+        // single element
+        (
+          expr
+          (
+            // multiple elements: OQL defines a comma-delimited list of
+            // indexes in its grammar, but seemingly fails to define the
+            // semantics.
+            // This grammar is left in just in case someone figures out what
+            // this means, but for now this will throw an UnsupportedOperationException
+            // at query compilation time
+            // (throw new UnsupportedOperationException("Only one index expression supported"))
+            (
+                TOK_COMMA!
+                expr 
+            )*
+
+            // Range of elements
+            |   TOK_COLON^ expr
+          ) 
+          | TOK_STAR
+        )
+        { #index = #([TOK_LBRACK, "index",
+            "org.apache.geode.cache.query.internal.parse.ASTCombination"],
+                #index);
+        }
+    ;
+
+argList :
+
+        t:TOK_LPAREN^<AST=org.apache.geode.cache.query.internal.parse.ASTCombination>
+        (
+            expr
+            (
+                TOK_COMMA!
+                expr
+            )*
+        )?
+        TOK_RPAREN!
+    ;
+
+primaryExpr :
+
+        (
+            conversionExpr
+        |   collectionExpr
+        |   aggregateExpr
+        |   undefinedExpr
+        |   ( identifier TOK_LPAREN identifier TOK_COLON ) =>
+                objectConstruction
+        |   structConstruction
+        |   collectionConstruction
+        |   methodInvocation[true]
+        |   identifier
+        |   queryParam
+        |   literal
+        |   TOK_LPAREN! query TOK_RPAREN!
+        |   RegionPath<AST=org.apache.geode.cache.query.internal.parse.ASTRegionPath>
+        )
+    ;
+
+
+conversionExpr :
+	(
+
+	    (
+                  "listtoset"^
+              |   "element"^<AST=org.apache.geode.cache.query.internal.parse.ASTConversionExpr>
+            
+              |   "distinct"^
+              |   "flatten"^
+            )
+            TOK_LPAREN! query TOK_RPAREN!
+        |
+           (  
+              (
+               "nvl"^<AST=org.apache.geode.cache.query.internal.parse.ASTConversionExpr>
+              )
+              TOK_LPAREN!
+              expr TOK_COMMA! expr
+              TOK_RPAREN! 
+           ) 
+        |
+           (  
+              (
+               "to_date"^<AST=org.apache.geode.cache.query.internal.parse.ASTConversionExpr>
+              )
+              TOK_LPAREN!
+              stringLiteral TOK_COMMA! stringLiteral
+              TOK_RPAREN! 
+           )    
+	)
+    ;
+
+collectionExpr :
+
+        (
+            "first"^
+        |   "last"^
+        |   "unique"^
+        |   "exists"^
+        )
+        TOK_LPAREN! query TOK_RPAREN!
+
+    ;
+
+
+
+            
+aggregateExpr  { int aggFunc = -1; boolean distinctOnly = false; }:
+
+             !("sum" {aggFunc = SUM;} | "avg" {aggFunc = AVG;} )
+              TOK_LPAREN ("distinct"! {distinctOnly = true;} ) ? tokExpr1:expr TOK_RPAREN 
+              { #aggregateExpr = #([AGG_FUNC, "aggregate", "org.apache.geode.cache.query.internal.parse.ASTAggregateFunc"],
+              #tokExpr1); 
+                ((ASTAggregateFunc)#aggregateExpr).setAggregateFunctionType(aggFunc);
+                ((ASTAggregateFunc)#aggregateExpr).setDistinctOnly(distinctOnly);
+               }
+             
+             |
+             !("min" {aggFunc = MIN;} | "max" {aggFunc = MAX;} )
+              TOK_LPAREN  tokExpr2:expr TOK_RPAREN 
+              { #aggregateExpr = #([AGG_FUNC, "aggregate", "org.apache.geode.cache.query.internal.parse.ASTAggregateFunc"],
+              #tokExpr2); 
+                ((ASTAggregateFunc)#aggregateExpr).setAggregateFunctionType(aggFunc);               
+               }
+             
+             |
+              "count"^<AST=org.apache.geode.cache.query.internal.parse.ASTAggregateFunc>
+              TOK_LPAREN!  ( TOK_STAR <AST=org.apache.geode.cache.query.internal.parse.ASTDummy>
+              | ("distinct"! {distinctOnly = true;} ) ? expr ) TOK_RPAREN! 
+              {  
+                 ((ASTAggregateFunc)#aggregateExpr).setAggregateFunctionType(COUNT);
+                 #aggregateExpr.setText("aggregate");
+                 ((ASTAggregateFunc)#aggregateExpr).setDistinctOnly(distinctOnly);
+              }
+    ;
+
+undefinedExpr :
+
+        (
+            "is_undefined"^<AST=org.apache.geode.cache.query.internal.parse.ASTUndefinedExpr>
+        |   "is_defined"^<AST=org.apache.geode.cache.query.internal.parse.ASTUndefinedExpr>
+        )
+        TOK_LPAREN!
+        query
+        TOK_RPAREN!
+    ;
+
+objectConstruction :
+
+        identifier
+        t:TOK_LPAREN^
+            {#t.setType(OBJ_CONSTRUCTOR);}
+        fieldList
+        TOK_RPAREN!
+    ;
+
+structConstruction :
+
+        "struct"^
+        TOK_LPAREN!
+        fieldList
+        TOK_RPAREN!
+    ;
+
+
+groupByList :
+
+        expr
+        (
+            TOK_COMMA!
+            expr
+        )*
+        /*{ #groupByList = #([COMBO, "groupByList",
+            "org.apache.geode.cache.query.internal.parse.ASTCombination"],
+                #groupByList); }*/
+  ;
+
+    
+fieldList :
+
+        identifier TOK_COLON! expr
+        (
+            TOK_COMMA!
+            identifier
+            TOK_COLON! expr
+        )*
+        { #fieldList = #([COMBO, "fieldList",
+            "org.apache.geode.cache.query.internal.parse.ASTCombination"],
+                #fieldList); }
+    ;
+
+collectionConstruction :
+        (
+            (
+                "array"^
+            |   "set"^<AST=org.apache.geode.cache.query.internal.parse.ASTConstruction>
+            |   "bag"^
+            )
+            argList
+
+        |   "list"^
+            TOK_LPAREN
+            (
+                expr
+                (
+                    TOK_DOTDOT expr
+                |   (
+                        TOK_COMMA expr
+                    )*
+                )
+            )?
+            TOK_RPAREN
+        )
+    ;
+
+queryParam! :
+
+        TOK_DOLLAR NUM_INT
+        { #queryParam = #([QUERY_PARAM, "queryParam",
+               "org.apache.geode.cache.query.internal.parse.ASTParameter"],
+                   #NUM_INT); }
+        
+    ;
+
+type :
+    
+      (
+//            ( "unsigned" )? // ignored
+//            (
+                typ00:"short"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ00.setJavaType(TypeUtils.getObjectType(Short.class)); }
+            |   typ01:"long"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ01.setJavaType(TypeUtils.getObjectType(Long.class)); }
+//            )
+        |   typ02:"int"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ02.setJavaType(TypeUtils.getObjectType(Integer.class)); }
+        |   typ03:"float"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ03.setJavaType(TypeUtils.getObjectType(Float.class)); }
+        |   typ04:"double"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ04.setJavaType(TypeUtils.getObjectType(Double.class)); }
+        |   typ05:"char"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ05.setJavaType(TypeUtils.getObjectType(Character.class)); }
+        |   typ06:"string"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ06.setJavaType(TypeUtils.getObjectType(String.class)); }
+        |   typ07:"boolean"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ07.setJavaType(TypeUtils.getObjectType(Boolean.class)); }
+        |   typ08:"byte"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ08.setJavaType(TypeUtils.getObjectType(Byte.class)); } 
+        |   typ09:"octet"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ09.setJavaType(TypeUtils.getObjectType(Byte.class)); }
+        |   "enum"^ // unsupported
+            (
+                identifier
+                TOK_DOT
+            )?
+            identifier
+        |   typ10:"date"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ10.setJavaType(TypeUtils.getObjectType(java.sql.Date.class)); }
+        |   typ11:"time"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ11.setJavaType(TypeUtils.getObjectType(java.sql.Time.class)); }
+        |   "interval" // unsupported
+        |   typ12:"timestamp"<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ12.setJavaType(TypeUtils.getObjectType(java.sql.Timestamp.class)); }
+        |   typ13:"set"^<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                TOK_LT! type TOK_GT!
+                    { #typ13.setJavaType(new CollectionTypeImpl(Set.class, TypeUtils.OBJECT_TYPE /*resolved later*/)); } 
+        |   typ14:"collection"^<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                TOK_LT! type TOK_GT!
+                    { #typ14.setJavaType(new CollectionTypeImpl(Collection.class, TypeUtils.OBJECT_TYPE /*resolved later*/)); } 
+        |   "bag"^ TOK_LT! type TOK_GT! // not supported
+        |   typ15:"list"^<AST=org.apache.geode.cache.query.internal.parse.ASTType> TOK_LT! type TOK_GT!
+                    { #typ15.setJavaType(new CollectionTypeImpl(List.class, TypeUtils.OBJECT_TYPE /*resolved later*/)); }
+        |   typ16:"array"^<AST=org.apache.geode.cache.query.internal.parse.ASTType> TOK_LT! type TOK_GT!
+                    { #typ16.setJavaType(new CollectionTypeImpl(Object[].class, TypeUtils.OBJECT_TYPE /*resolved later*/)); }
+        |   (typ17:"dictionary"^<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ17.setJavaType(new MapTypeImpl(Map.class, TypeUtils.OBJECT_TYPE , TypeUtils.OBJECT_TYPE /*resolved later*/)); }
+                | typ18:"map"^<AST=org.apache.geode.cache.query.internal.parse.ASTType>
+                    { #typ18.setJavaType(new MapTypeImpl(Map.class, TypeUtils.OBJECT_TYPE , TypeUtils.OBJECT_TYPE /*resolved later*/)); }
+            )
+            TOK_LT! type TOK_COMMA! type TOK_GT!
+        |!   id:identifier { String txt = #id.getText();
+                #type = #[Identifier, txt, "org.apache.geode.cache.query.internal.parse.ASTType"];
+                 ((ASTType)#type).setTypeName(txt); }
+      )
+      
+
+    ;
+
+literal :
+
+            objectLiteral
+        |   booleanLiteral
+        |   numericLiteral
+        |   charLiteral
+        |   stringLiteral
+        |   dateLiteral
+        |   timeLiteral
+        |   timestampLiteral
+    ;
+
+objectLiteral :
+
+        "nil"<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+      | "null"<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+      | "undefined"<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+    ;
+
+booleanLiteral :
+
+        (
+            "true"<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+        |   "false"<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+        )
+    ;
+
+numericLiteral :
+
+        (   NUM_INT<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+          | NUM_LONG<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+          | NUM_FLOAT<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+          | NUM_DOUBLE<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+        )
+        
+    ;
+
+
+charLiteral :
+
+        "char"^<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+            StringLiteral
+    ;
+
+
+stringLiteral :
+
+        StringLiteral<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+    ;
+
+dateLiteral :
+
+        "date"^<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+            StringLiteral
+    ;
+
+timeLiteral :
+
+        "time"^<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+            StringLiteral
+    ;
+
+timestampLiteral :
+
+        "timestamp"^<AST=org.apache.geode.cache.query.internal.parse.ASTLiteral>
+           StringLiteral
+    ;
+
+identifier :
+        Identifier<AST=org.apache.geode.cache.query.internal.parse.ASTIdentifier>
+    |   q:QuotedIdentifier<AST=org.apache.geode.cache.query.internal.parse.ASTIdentifier> 
+            { #q.setType(Identifier); }
+    ;
+

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/AbstractCompiledValue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/AbstractCompiledValue.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/AbstractCompiledValue.java
index 7924e11..d635e02 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/AbstractCompiledValue.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/AbstractCompiledValue.java
@@ -16,8 +16,8 @@ package org.apache.geode.cache.query.internal;
 
 import java.util.*;
 import org.apache.geode.cache.query.*;
-import org.apache.geode.cache.query.types.*;
 import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
+import org.apache.geode.cache.query.types.*;
 import org.apache.geode.cache.query.internal.types.StructTypeImpl;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledIn.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledIn.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledIn.java
index 7f8849e..0aa1efb 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledIn.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledIn.java
@@ -25,6 +25,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.cache.Region;
@@ -41,7 +42,6 @@ import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache.query.internal.index.IndexData;
 import org.apache.geode.cache.query.internal.index.IndexProtocol;
 import org.apache.geode.cache.query.internal.index.IndexUtils;
-import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.geode.cache.query.internal.types.StructTypeImpl;
 import org.apache.geode.cache.query.internal.types.TypeUtils;
 import org.apache.geode.cache.query.types.ObjectType;

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledLike.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledLike.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledLike.java
index 48e79cc..fc4a843 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledLike.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledLike.java
@@ -19,7 +19,6 @@ import java.util.regex.Pattern;
 import org.apache.geode.cache.query.AmbiguousNameException;
 import org.apache.geode.cache.query.FunctionDomainException;
 import org.apache.geode.cache.query.NameResolutionException;
-import org.apache.geode.cache.query.QueryInvalidException;
 import org.apache.geode.cache.query.QueryInvocationTargetException;
 import org.apache.geode.cache.query.QueryService;
 import org.apache.geode.cache.query.SelectResults;
@@ -29,7 +28,6 @@ import org.apache.geode.cache.query.internal.index.IndexProtocol;
 import org.apache.geode.cache.query.internal.index.PrimaryKeyIndex;
 import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
-import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.pdx.internal.PdxString;
 
 /**

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledSortCriterion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledSortCriterion.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledSortCriterion.java
index bb3ea3b..5268b1c 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledSortCriterion.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledSortCriterion.java
@@ -17,20 +17,14 @@ package org.apache.geode.cache.query.internal;
 
 import java.util.*;
 
-import org.apache.geode.GemFireCacheException;
-import org.apache.geode.GemFireException;
 import org.apache.geode.cache.CacheException;
 import org.apache.geode.cache.query.AmbiguousNameException;
 import org.apache.geode.cache.query.FunctionDomainException;
-import org.apache.geode.cache.query.IndexInvalidException;
 import org.apache.geode.cache.query.NameResolutionException;
-import org.apache.geode.cache.query.QueryException;
-import org.apache.geode.cache.query.QueryInvalidException;
 import org.apache.geode.cache.query.QueryInvocationTargetException;
 import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.geode.cache.query.internal.types.TypeUtils;
-import org.apache.geode.internal.i18n.LocalizedStrings;
 
 /**
  * This class represents a compiled form of sort criterian present in order by clause

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompositeGroupJunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompositeGroupJunction.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompositeGroupJunction.java
index 9b2ca4f..8f57ad6 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompositeGroupJunction.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/CompositeGroupJunction.java
@@ -32,7 +32,6 @@ import org.apache.geode.cache.query.SelectResults;
 import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.geode.cache.query.internal.types.StructTypeImpl;
-import org.apache.geode.cache.query.internal.SelectResultsComparator;
 import org.apache.geode.cache.query.types.ObjectType;
 import org.apache.geode.cache.query.types.StructType;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/DerivedInfo.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/DerivedInfo.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/DerivedInfo.java
index 0cfa80d..26c579a 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/DerivedInfo.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/DerivedInfo.java
@@ -17,25 +17,20 @@ package org.apache.geode.cache.query.internal;
 
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.geode.cache.query.FunctionDomainException;
 import org.apache.geode.cache.query.Index;
 import org.apache.geode.cache.query.NameResolutionException;
 import org.apache.geode.cache.query.QueryInvocationTargetException;
 import org.apache.geode.cache.query.SelectResults;
-import org.apache.geode.cache.query.Struct;
 import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache.query.internal.index.AbstractIndex;
 import org.apache.geode.cache.query.internal.index.IndexProtocol;
 import org.apache.geode.cache.query.internal.index.PartitionedIndex;
-import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
-import org.apache.geode.cache.query.types.CollectionType;
 import org.apache.geode.cache.query.types.ObjectType;
 
 public class DerivedInfo {

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/IndexInfo.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/IndexInfo.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/IndexInfo.java
index e6f0f1c..c2a54bd 100755
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/IndexInfo.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/IndexInfo.java
@@ -15,13 +15,11 @@
 package org.apache.geode.cache.query.internal;
 
 import org.apache.geode.cache.query.FunctionDomainException;
-import org.apache.geode.cache.query.IndexType;
 import org.apache.geode.cache.query.NameResolutionException;
 import org.apache.geode.cache.query.QueryInvocationTargetException;
 import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache.query.internal.index.AbstractIndex;
 import org.apache.geode.cache.query.internal.index.IndexProtocol;
-import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 
 public class IndexInfo {
   final private CompiledValue _key;

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/PathUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/PathUtils.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/PathUtils.java
index 8c31b0f..bf931a2 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/PathUtils.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/PathUtils.java
@@ -24,8 +24,8 @@ import org.apache.geode.cache.query.NameNotFoundException;
 import org.apache.geode.cache.query.QueryService;
 import org.apache.geode.cache.query.Struct;
 import org.apache.geode.cache.query.TypeMismatchException;
-import org.apache.geode.cache.query.types.*;
 import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
+import org.apache.geode.cache.query.types.*;
 import org.apache.geode.cache.query.internal.types.*;
 
 

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/QCompiler.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/QCompiler.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/QCompiler.java
index eec2f97..1ee4d17 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/QCompiler.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/QCompiler.java
@@ -23,21 +23,17 @@ import java.util.List;
 import java.util.Map;
 import java.util.Stack;
 
+import org.apache.geode.cache.query.internal.parse.OQLLexer;
+import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
+import org.apache.geode.cache.query.internal.parse.OQLParser;
 import org.apache.logging.log4j.Logger;
 
-import antlr.collections.AST;
-import antlr.debug.misc.ASTFrame;
-
 import org.apache.geode.cache.query.FunctionDomainException;
 import org.apache.geode.cache.query.NameResolutionException;
-import org.apache.geode.cache.query.QueryException;
 import org.apache.geode.cache.query.QueryInvalidException;
 import org.apache.geode.cache.query.QueryInvocationTargetException;
 import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache.query.internal.parse.GemFireAST;
-import org.apache.geode.cache.query.internal.parse.OQLLexer;
-import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
-import org.apache.geode.cache.query.internal.parse.OQLParser;
 import org.apache.geode.cache.query.internal.types.CollectionTypeImpl;
 import org.apache.geode.cache.query.internal.types.MapTypeImpl;
 import org.apache.geode.cache.query.internal.types.ObjectTypeImpl;
@@ -45,7 +41,6 @@ import org.apache.geode.cache.query.internal.types.TypeUtils;
 import org.apache.geode.cache.query.types.CollectionType;
 import org.apache.geode.cache.query.types.MapType;
 import org.apache.geode.cache.query.types.ObjectType;
-import org.apache.geode.i18n.LogWriterI18n;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.InternalDataSerializer;
 import org.apache.geode.internal.i18n.LocalizedStrings;

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryUtils.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryUtils.java
index 33e4181..8eaa74a 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryUtils.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryUtils.java
@@ -24,6 +24,7 @@ import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.cache.query.AmbiguousNameException;
@@ -41,7 +42,6 @@ import org.apache.geode.cache.query.internal.index.IndexManager;
 import org.apache.geode.cache.query.internal.index.IndexProtocol;
 import org.apache.geode.cache.query.internal.index.IndexUtils;
 import org.apache.geode.cache.query.internal.index.PartitionedIndex;
-import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.geode.cache.query.internal.types.StructTypeImpl;
 import org.apache.geode.cache.query.types.CollectionType;
 import org.apache.geode.cache.query.types.ObjectType;

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/RangeJunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/RangeJunction.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/RangeJunction.java
index b2b35ab..42fb30d 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/RangeJunction.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/RangeJunction.java
@@ -33,8 +33,8 @@ import org.apache.geode.cache.query.QueryService;
 import org.apache.geode.cache.query.SelectResults;
 import org.apache.geode.cache.query.Struct;
 import org.apache.geode.cache.query.TypeMismatchException;
-import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
+import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.cache.query.internal.types.StructTypeImpl;
 import org.apache.geode.cache.query.internal.types.TypeUtils;
 import org.apache.geode.cache.query.types.ObjectType;

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java
index 3e85ca2..96a3c83 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java
@@ -26,6 +26,7 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
+import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.cache.Cache;
@@ -59,7 +60,6 @@ import org.apache.geode.cache.query.internal.StructFields;
 import org.apache.geode.cache.query.internal.StructImpl;
 import org.apache.geode.cache.query.internal.Support;
 import org.apache.geode.cache.query.internal.index.IndexStore.IndexStoreEntry;
-import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.geode.cache.query.internal.types.StructTypeImpl;
 import org.apache.geode.cache.query.internal.types.TypeUtils;
 import org.apache.geode.cache.query.types.ObjectType;
@@ -73,8 +73,6 @@ import org.apache.geode.internal.cache.RegionEntry;
 import org.apache.geode.internal.cache.persistence.query.CloseableIterator;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.offheap.StoredObject;
-import org.apache.geode.internal.offheap.annotations.Released;
 import org.apache.geode.internal.offheap.annotations.Retained;
 import org.apache.geode.pdx.PdxInstance;
 import org.apache.geode.pdx.internal.PdxString;

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/FunctionalIndexCreationHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/FunctionalIndexCreationHelper.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/FunctionalIndexCreationHelper.java
index f4f5c20..eb16207 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/FunctionalIndexCreationHelper.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/FunctionalIndexCreationHelper.java
@@ -20,15 +20,12 @@
 package org.apache.geode.cache.query.internal.index;
 
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.query.AmbiguousNameException;
 import org.apache.geode.cache.query.IndexInvalidException;
-import org.apache.geode.cache.query.IndexType;
 import org.apache.geode.cache.query.NameResolutionException;
 import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache.query.internal.CompiledBindArgument;

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java
index b7aff62..023fbb4 100755
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/HashIndex.java
@@ -29,11 +29,11 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
+import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.EntryDestroyedException;
-import org.apache.geode.cache.EntryNotFoundException;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionAttributes;
 import org.apache.geode.cache.query.AmbiguousNameException;
@@ -63,7 +63,6 @@ import org.apache.geode.cache.query.internal.RuntimeIterator;
 import org.apache.geode.cache.query.internal.Support;
 import org.apache.geode.cache.query.internal.index.HashIndex.IMQEvaluator.HashIndexComparator;
 import org.apache.geode.cache.query.internal.index.IndexStore.IndexStoreEntry;
-import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
 import org.apache.geode.cache.query.internal.types.StructTypeImpl;
 import org.apache.geode.cache.query.internal.types.TypeUtils;
 import org.apache.geode.cache.query.types.ObjectType;

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MapIndexStore.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MapIndexStore.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MapIndexStore.java
index 262f082..74584fb 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MapIndexStore.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MapIndexStore.java
@@ -17,7 +17,6 @@ package org.apache.geode.cache.query.internal.index;
 import java.util.Collection;
 import java.util.Iterator;
 
-import org.apache.geode.cache.EntryDestroyedException;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes;
@@ -25,9 +24,6 @@ import org.apache.geode.cache.query.internal.types.TypeUtils;
 import org.apache.geode.internal.cache.CachedDeserializable;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.RegionEntry;
-import org.apache.geode.internal.cache.RegionEntryContext;
-import org.apache.geode.internal.cache.Token;
-import org.apache.geode.internal.cache.LocalRegion.NonTXEntry;
 import org.apache.geode.internal.cache.persistence.query.CloseableIterator;
 import org.apache.geode.internal.cache.persistence.query.IndexMap;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/93d4455d/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/RangeIndex.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/RangeIndex.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/RangeIndex.java
index 0f0f538..5ac48bc 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/RangeIndex.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/RangeIndex.java
@@ -46,7 +46,6 @@ import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache.query.internal.CompiledSortCriterion;
 import org.apache.geode.cache.query.internal.CompiledValue;
 import org.apache.geode.cache.query.internal.ExecutionContext;
-import org.apache.geode.cache.query.internal.QueryMonitor;
 import org.apache.geode.cache.query.internal.QueryObserver;
 import org.apache.geode.cache.query.internal.QueryObserverHolder;
 import org.apache.geode.cache.query.internal.RuntimeIterator;


Mime
View raw message