You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ge...@apache.org on 2020/11/02 05:47:12 UTC

[iotdb] branch add_debug_sql_log created (now bf57de6)

This is an automated email from the ASF dual-hosted git repository.

geniuspig pushed a change to branch add_debug_sql_log
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at bf57de6  add debug log

This branch includes the following new commits:

     new bf57de6  add debug log

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: add debug log

Posted by ge...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

geniuspig pushed a commit to branch add_debug_sql_log
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit bf57de604daf3ae315a847cbbeee4298a373737a
Author: Boris <96...@qq.com>
AuthorDate: Mon Nov 2 13:46:16 2020 +0800

    add debug log
---
 .../src/main/java/org/apache/iotdb/db/qp/strategy/ParseDriver.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/qp/strategy/ParseDriver.java b/server/src/main/java/org/apache/iotdb/db/qp/strategy/ParseDriver.java
index 89b05e6..4aee03e 100644
--- a/server/src/main/java/org/apache/iotdb/db/qp/strategy/ParseDriver.java
+++ b/server/src/main/java/org/apache/iotdb/db/qp/strategy/ParseDriver.java
@@ -26,14 +26,18 @@ import org.antlr.v4.runtime.atn.PredictionMode;
 import org.antlr.v4.runtime.misc.ParseCancellationException;
 import org.antlr.v4.runtime.tree.ParseTree;
 import org.antlr.v4.runtime.tree.ParseTreeWalker;
+import org.apache.iotdb.db.qp.executor.PlanExecutor;
 import org.apache.iotdb.db.qp.logical.Operator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * ParseDriver.
  *
  */
 public class ParseDriver {
-  private ParseTreeWalker walker;
+  private final ParseTreeWalker walker;
+  private static final Logger logger = LoggerFactory.getLogger(ParseDriver.class);
 
   public ParseDriver() {
     walker = new ParseTreeWalker();
@@ -41,6 +45,7 @@ public class ParseDriver {
 
   public Operator parse(String sql, ZoneId zoneId) throws ParseCancellationException {
     LogicalGenerator logicalGenerator = new LogicalGenerator(zoneId);
+    logger.debug("Input sql is " + sql);
     CharStream charStream1 = CharStreams.fromString(sql);
     SqlBaseLexer lexer1 = new SqlBaseLexer(charStream1);
     CommonTokenStream tokens1 = new CommonTokenStream(lexer1);