asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AsterixDB Code Review <do-not-re...@asterix-gerrit.ics.uci.edu>
Subject Change in asterixdb[master]: [ASTERIXDB-2912][SQL] Use modern JavaCC template
Date Mon, 14 Jun 2021 04:30:10 GMT
>From Cameron Samak <csamak@apache.org>:

Cameron Samak has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11925
)


Change subject: [ASTERIXDB-2912][SQL] Use modern JavaCC template
......................................................................

[ASTERIXDB-2912][SQL] Use modern JavaCC template

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
The default "classic" maintains compatibility with very old versions of
JavaCC.
TokenMgrException is now a checked Exception, not an Error.
Included jj changes avoid compilation issues (mostly unreachable
statements since productions are only allowed one return).

Change-Id: Icd942df4adc2699f4787d4348acb9b24584039a6
---
M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/AbstractInternalRequestMessage.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ExecuteStatementRequestMessage.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ExecutionError.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParserFactory.java
M asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
M asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/SqlppParserFactory.java
M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
M asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdgClientDriver.java
M asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdmDataGen.java
11 files changed, 68 insertions(+), 69 deletions(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/25/11925/1

diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
index c5eb69d..cb43ed4 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
@@ -157,7 +157,7 @@
             duration = (endTime - startTime) / 1000.00;
             out.println(HTML_STATEMENT_SEPARATOR);
             out.println("<PRE>Duration of all jobs: " + duration + " sec</PRE>");
-        } catch (AsterixException | org.apache.asterix.lang.sqlpp.parser.TokenMgrError pe)
{
+        } catch (AsterixException | org.apache.asterix.lang.sqlpp.parser.TokenMgrException
pe) {
             GlobalConfig.ASTERIX_LOGGER.log(Level.INFO, pe.toString(), pe);
             ResultUtil.webUIParseExceptionHandler(out, pe, query);
         } catch (Exception e) {
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
index a043050..d369744 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
@@ -304,7 +304,7 @@
                 executionState.setStatus(ResultStatus.SUCCESS, HttpResponseStatus.OK);
             }
             errorCount = 0;
-        } catch (Exception | org.apache.asterix.lang.sqlpp.parser.TokenMgrError e) {
+        } catch (Exception e) {
             handleExecuteStatementException(e, executionState, param);
             response.setStatus(executionState.getHttpStatus());
             requestFailed(e, responsePrinter);
@@ -452,7 +452,7 @@
 
     protected void handleExecuteStatementException(Throwable t, RequestExecutionState executionState,
             QueryServiceRequestParameters param) {
-        if (t instanceof org.apache.asterix.lang.sqlpp.parser.TokenMgrError || t instanceof
AlgebricksException) {
+        if (t instanceof org.apache.asterix.lang.sqlpp.parser.TokenMgrException || t instanceof
AlgebricksException) {
             if (LOGGER.isDebugEnabled()) {
                 LOGGER.debug("handleException: {}: {}", t.getMessage(), LogRedactionUtil.statement(param.toString()),
                         t);
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/AbstractInternalRequestMessage.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/AbstractInternalRequestMessage.java
index 26aac63..170b1a5 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/AbstractInternalRequestMessage.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/AbstractInternalRequestMessage.java
@@ -102,7 +102,7 @@
                         compilationProvider, componentProvider, printer);
         try {
             translator.compileAndExecute(ccAppCtx.getHcc(), requestParams);
-        } catch (AlgebricksException | HyracksException | org.apache.asterix.lang.sqlpp.parser.TokenMgrError
pe) {
+        } catch (AlgebricksException | HyracksException | org.apache.asterix.lang.sqlpp.parser.TokenMgrException
pe) {
             // we trust that "our" exceptions are serializable and have a comprehensible
error message
             GlobalConfig.ASTERIX_LOGGER.log(Level.WARN, pe.getMessage(), pe);
             responseMsg.setError(pe);
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ExecuteStatementRequestMessage.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ExecuteStatementRequestMessage.java
index 29ee76d..4eb4b8d 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ExecuteStatementRequestMessage.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/ExecuteStatementRequestMessage.java
@@ -177,7 +177,7 @@
             responseMsg.setStatementProperties(statementProperties);
             responseMsg.setExecutionPlans(translator.getExecutionPlans());
             responseMsg.setWarnings(warnings);
-        } catch (AlgebricksException | HyracksException | org.apache.asterix.lang.sqlpp.parser.TokenMgrError
pe) {
+        } catch (AlgebricksException | HyracksException | org.apache.asterix.lang.sqlpp.parser.TokenMgrException
pe) {
             // we trust that "our" exceptions are serializable and have a comprehensible
error message
             GlobalConfig.ASTERIX_LOGGER.log(Level.WARN, pe.getMessage(), pe);
             responseMsg.setError(pe);
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ExecutionError.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ExecutionError.java
index 6556b61..40b9c56 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ExecutionError.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ExecutionError.java
@@ -37,7 +37,7 @@
         Throwable rootCause = ResultUtil.getRootCause(t);
         String msg = rootCause.getMessage();
         if (!(rootCause instanceof AlgebricksException || rootCause instanceof HyracksException
-                || rootCause instanceof org.apache.asterix.lang.sqlpp.parser.TokenMgrError))
{
+                || rootCause instanceof org.apache.asterix.lang.sqlpp.parser.TokenMgrException))
{
             msg = rootCause.getClass().getSimpleName() + (msg == null ? "" : ": " + msg);
         }
         return new ExecutionError(1, msg);
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParserFactory.java
b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParserFactory.java
index 1775fbb..76c78a88 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParserFactory.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IParserFactory.java
@@ -18,13 +18,9 @@
  */
 package org.apache.asterix.lang.common.base;
 
-import java.io.Reader;
-
 public interface IParserFactory {
 
     IParser createParser(String query);
 
-    IParser createParser(Reader reader);
-
     String getLanguage();
 }
diff --git a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
index ded91af..05dfe12 100644
--- a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
+++ b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/FunctionUtil.java
@@ -19,7 +19,6 @@
 
 package org.apache.asterix.lang.common.util;
 
-import java.io.StringReader;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -366,7 +365,7 @@
             throw new CompilationException(ErrorCode.COMPILATION_INCOMPATIBLE_FUNCTION_LANGUAGE,
sourceLoc,
                     function.getLanguage(), function.getSignature().toString(), parserFactory.getLanguage());
         }
-        IParser parser = parserFactory.createParser(new StringReader(function.getFunctionBody()));
+        IParser parser = parserFactory.createParser(function.getFunctionBody());
         try {
             FunctionDecl functionDecl =
                     parser.parseFunctionBody(function.getSignature(), function.getParameterNames(),
true);
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/SqlppParserFactory.java
b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/SqlppParserFactory.java
index 5b724f2..7fec33c 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/SqlppParserFactory.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/parser/SqlppParserFactory.java
@@ -18,8 +18,6 @@
  */
 package org.apache.asterix.lang.sqlpp.parser;
 
-import java.io.Reader;
-
 import org.apache.asterix.lang.common.base.IParser;
 import org.apache.asterix.lang.common.base.IParserFactory;
 
@@ -30,12 +28,7 @@
 
     @Override
     public IParser createParser(String query) {
-        return new SQLPPParser(query);
-    }
-
-    @Override
-    public IParser createParser(Reader reader) {
-        return new SQLPPParser(reader);
+        return new SQLPPParser(new StringProvider(query));
     }
 
     @Override
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index c4c86f4..0fce612 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -20,6 +20,7 @@
   COMMON_TOKEN_ACTION = true;
   STATIC = false;
   TOKEN_EXTENDS = "org.apache.asterix.lang.sqlpp.parser.SqlppToken";
+  JAVA_TEMPLATE_TYPE = "modern";
 }
 
 PARSER_BEGIN(SQLPPParser)
@@ -29,14 +30,11 @@
 // For SQL++ ParserTokenManager
 import java.util.ArrayDeque;
 
-import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -333,15 +331,8 @@
       }
     }
 
-    public SQLPPParser(String s) {
-        this(new StringReader(s));
-        super.setInput(s);
-    }
-
-    public static void main(String args[]) throws ParseException, TokenMgrError, IOException,
FileNotFoundException, CompilationException {
-        File file = new File(args[0]);
-        Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(file),
"UTF-8"));
-        SQLPPParser parser = new SQLPPParser(fis);
+    public static void main(String[] args) throws ParseException, TokenMgrException, IOException,
CompilationException {
+        SQLPPParser parser = new SQLPPParser(Files.readString(Paths.get(args[0]), StandardCharsets.UTF_8));
         List<Statement> st = parser.parse();
         //st.accept(new SQLPPPrintVisitor(), 0);
     }
@@ -367,7 +358,7 @@
     }
 
     private static Expression parseExpression(String text) throws CompilationException {
-        return new SQLPPParser(text).parseExpression();
+        return new SQLPPParser(new StringProvider(text)).parseExpression();
     }
 
     @Override
@@ -390,7 +381,7 @@
     }
 
     private static List<String> parseParenthesizedIdentifierList(String text) throws
CompilationException {
-        return new SQLPPParser(text).parseParenthesizedIdentifierList();
+        return new SQLPPParser(new StringProvider(text)).parseParenthesizedIdentifierList();
     }
 
     @Override
@@ -689,6 +680,7 @@
         throw pe;
       }
     }
+}}
 }
 
 PARSER_END(SQLPPParser)
@@ -952,15 +944,17 @@
   ( LOOKAHEAD(2) <WITH> <FILTER> <ON>  filterField = NestedField() )?
   ( <WITH> withRecord = RecordConstructor() )?
   {
+    DatasetDecl result;
     try {
       InternalDetailsDecl idd = new InternalDetailsDecl(primaryKeyFields.second, primaryKeyFields.first,
autogenerated,
         filterField == null? null : filterField.first, filterField == null? null : filterField.second);
       stmt = new DatasetDecl(nameComponents.first, nameComponents.second, typeExpr, metaTypeExpr,
hints,
         DatasetType.INTERNAL, idd, withRecord, ifNotExists);
-      return addSourceLocation(stmt, startStmtToken);
+      result = addSourceLocation(stmt, startStmtToken);
     } catch (CompilationException e) {
        throw new SqlppParseException(getSourceLocation(startStmtToken), e.getMessage());
     }
+    return result;
   }
 }
 
@@ -986,13 +980,15 @@
     ExternalDetailsDecl edd = new ExternalDetailsDecl();
     edd.setAdapter(adapterName);
     edd.setProperties(properties);
+    DatasetDecl result;
     try {
       stmt = new DatasetDecl(nameComponents.first, nameComponents.second, typeExpr, null,
hints, DatasetType.EXTERNAL,
         edd, withRecord, ifNotExists);
-      return addSourceLocation(stmt, startStmtToken);
+      result = addSourceLocation(stmt, startStmtToken);
     } catch (CompilationException e) {
        throw new SqlppParseException(getSourceLocation(startStmtToken), e.getMessage());
     }
+    return result;
   }
 }
 
@@ -1590,12 +1586,14 @@
   nameComponents = QualifiedName() ifNotExists = IfNotExists()
   <WITH> withRecord = RecordConstructor()
   {
+    CreateFeedStatement result;
     try {
       stmt = new CreateFeedStatement(nameComponents, withRecord, ifNotExists);
-      return addSourceLocation(stmt, startStmtToken);
+      result = addSourceLocation(stmt, startStmtToken);
     } catch (AlgebricksException e) {
       throw new SqlppParseException(getSourceLocation(startStmtToken), e.getMessage());
     }
+    return result;
   }
 }
 
@@ -1668,12 +1666,14 @@
     expr = RecordConstructor()
   )
   {
+    CreateFullTextFilterStatement result;
     try {
       stmt = new CreateFullTextFilterStatement(nameComponents.first, nameComponents.second.getValue(),
ifNotExists, expr);
-      return addSourceLocation(stmt, startStmtToken);
+      result = addSourceLocation(stmt, startStmtToken);
     } catch (CompilationException e) {
        throw new SqlppParseException(getSourceLocation(startStmtToken), e.getMessage());
     }
+    return result;
   }
 }
 
@@ -1691,12 +1691,14 @@
     expr = RecordConstructor()
   )
   {
+    CreateFullTextConfigStatement result;
     try {
       stmt = new CreateFullTextConfigStatement(nameComponents.first, nameComponents.second.getValue(),
ifNotExists, expr);
-      return addSourceLocation(stmt, startStmtToken);
+      result = addSourceLocation(stmt, startStmtToken);
     } catch (CompilationException e) {
        throw new SqlppParseException(getSourceLocation(startStmtToken), e.getMessage());
     }
+    return result;
   }
 }
 
@@ -1729,15 +1731,16 @@
 
 boolean IfNotExists() throws ParseException:
 {
+  boolean result = false;
 }
 {
   ( LOOKAHEAD(1) <IF> <NOT> <EXISTS>
     {
-      return true;
+      result = true;
     }
   )?
     {
-      return false;
+      return result;
     }
 }
 
@@ -2144,15 +2147,16 @@
 
 boolean IfExists() throws ParseException :
 {
+  boolean result = false;
 }
 {
   ( LOOKAHEAD(1) <IF> <EXISTS>
     {
-      return true;
+      result = true;
     }
   )?
     {
-      return false;
+      return result;
     }
 }
 
@@ -2272,10 +2276,10 @@
    | <IF> <LEFTPAREN> condition = Expression() <RIGHTPAREN>
      <THEN> ifbranch = UpdateClause()
      [LOOKAHEAD(1) <ELSE> elsebranch = UpdateClause()]
-     {
-       return new UpdateClause(target, value, is, ds, us, condition, ifbranch, elsebranch);
-     }
    )
+   {
+     return new UpdateClause(target, value, is, ds, us, condition, ifbranch, elsebranch);
+   }
 }
 
 Statement SetStatement() throws ParseException:
@@ -2768,18 +2772,18 @@
 
 String Identifier() throws ParseException:
 {
-  String lit = null;
+  String result;
 }
 {
   (<IDENTIFIER>
     {
-      return token.image;
+      result = token.image;
     }
-  | lit = QuotedString()
-    {
-      return lit;
-    }
+  | result = QuotedString()
   )
+  {
+    return result;
+  }
 }
 
 List<String> ParenthesizedIdentifierList() throws ParseException:
@@ -3993,15 +3997,17 @@
 {
   <IDENTIFIER>
   {
+    WindowExpression.FrameMode result;
     if (isToken(RANGE)) {
-      return WindowExpression.FrameMode.RANGE;
+      result = WindowExpression.FrameMode.RANGE;
     } else if (isToken(ROWS)) {
-      return WindowExpression.FrameMode.ROWS;
+      result = WindowExpression.FrameMode.ROWS;
     } else if (isToken(GROUPS)) {
-      return WindowExpression.FrameMode.GROUPS;
+      result = WindowExpression.FrameMode.GROUPS;
     } else {
       throw createUnexpectedTokenError();
     }
+    return result;
   }
 }
 
@@ -4038,6 +4044,7 @@
 WindowExpression.FrameExclusionKind WindowFrameExclusion() throws ParseException:
 {
   boolean current = false, no = false;
+  WindowExpression.FrameExclusionKind result;
 }
 {
   <IDENTIFIER>
@@ -4047,7 +4054,7 @@
   (
     <GROUP>
     {
-      return WindowExpression.FrameExclusionKind.GROUP;
+      result = WindowExpression.FrameExclusionKind.GROUP;
     }
     |
     (
@@ -4066,15 +4073,18 @@
       <IDENTIFIER>
       {
         if (current && isToken(ROW)) {
-          return WindowExpression.FrameExclusionKind.CURRENT_ROW;
+          result = WindowExpression.FrameExclusionKind.CURRENT_ROW;
         } else if (no && isToken(OTHERS)) {
-          return WindowExpression.FrameExclusionKind.NO_OTHERS;
+          result = WindowExpression.FrameExclusionKind.NO_OTHERS;
         } else {
           throw createUnexpectedTokenError();
         }
       }
     )
   )
+  {
+    return result;
+  }
 }
 
 Expression ParenthesizedExpression() throws ParseException:
@@ -4852,7 +4862,7 @@
          int errorColumn = input_stream.getEndColumn();
          String msg = "Lexical error at line " + errorLine + ", column " + errorColumn +
". Encountered \"" + token
              + "\" but state stack is empty.";
-         throw new TokenMgrError(msg, -1);
+         throw new TokenMgrException(msg, -1);
       }
     }
 
diff --git a/asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdgClientDriver.java
b/asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdgClientDriver.java
index 8a1adb0..296d632 100644
--- a/asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdgClientDriver.java
+++ b/asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdgClientDriver.java
@@ -19,6 +19,7 @@
 package org.apache.asterix.tools.datagen;
 
 import java.io.File;
+import java.nio.file.Path;
 
 import org.kohsuke.args4j.Argument;
 import org.kohsuke.args4j.CmdLineParser;
@@ -30,7 +31,7 @@
     public static class AdgClientConfig {
 
         @Argument(index = 0, required = true, metaVar = "ARG1", usage = "The file containing
the annotated schema.")
-        private File schemaFile;
+        private Path schemaFile;
 
         @Argument(index = 1, required = true, metaVar = "ARG2", usage = "The output directory
path.")
         private File outputDir;
diff --git a/asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdmDataGen.java
b/asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdmDataGen.java
index aa86916..fb02243 100644
--- a/asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdmDataGen.java
+++ b/asterixdb/asterix-tools/src/test/java/org/apache/asterix/tools/datagen/AdmDataGen.java
@@ -21,9 +21,11 @@
 import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.PrintStream;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -922,23 +924,21 @@
 
     }
 
-    private final File schemaFile;
+    private final Path schemaFile;
     private final File outputDir;
     private Map<TypeSignature, IAType> typeMap;
     private Map<TypeSignature, TypeDataGen> typeAnnotMap;
     private DataGeneratorContext dgCtx;
     private final IParserFactory parserFactory = new SqlppParserFactory();
 
-    public AdmDataGen(File schemaFile, File outputDir) {
+    public AdmDataGen(Path schemaFile, File outputDir) {
         this.schemaFile = schemaFile;
         this.outputDir = outputDir;
     }
 
     public void init() throws IOException, ACIDException, AlgebricksException {
-        FileReader aql = new FileReader(schemaFile);
-        IParser parser = parserFactory.createParser(aql);
+        IParser parser = parserFactory.createParser(Files.readString(schemaFile, StandardCharsets.UTF_8));
         List<Statement> statements = parser.parse();
-        aql.close();
         // TODO: Need to fix how to use transactions here.
         MetadataTransactionContext mdTxnCtx = new MetadataTransactionContext(new TxnId(-1));
         ADGenDmlTranslator dmlt = new ADGenDmlTranslator(mdTxnCtx, statements);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11925
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: Icd942df4adc2699f4787d4348acb9b24584039a6
Gerrit-Change-Number: 11925
Gerrit-PatchSet: 1
Gerrit-Owner: Cameron Samak <csamak@apache.org>
Gerrit-MessageType: newchange

Mime
View raw message