[GitHub] [incubator-iotdb] jack870131 edited a comment on issue #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 edited a comment on issue #435: [IOTDB-174] Fix querying timeseries 
interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#issuecomment-542953161
 
 
   Hi, I have no idea now about how to implement the interface which could show 
all devices (which is another issue) as it was not developed by me before. What 
I done here is just making sure that the program does not report the error.
   
   However, I would like to discuss with you guys about how to make changes of 
this function, could you please give me some advices? I think this should 
create another PR for this or reopen PR #421 to correct this issue.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on issue #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on issue #435: [IOTDB-174] Fix querying timeseries 
interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#issuecomment-542956441
 
 
   > Please modify the SQL Reference document to add `COUNT` clause.
   
   I have added the new schema statement in it. Please have a look.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying 
timeseries interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#discussion_r335772511
 
 

 ##
 File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
 ##
 @@ -782,20 +783,28 @@ private void findStorageGroup(MNode node, String path, 
HashSet res) {
*
* @return a list contains all distinct devices
*/
-  Set getAllDevices() {
-return new HashSet<>(getNodesList(3));
+  Set getAllDevices() throws SQLException {
+return new HashSet<>(getNodesList("root",2));
 
 Review comment:
   @LeiRui Hi, thanks for your detailed explanation. Actually I have no idea 
now about how to implement this interface as it was not developed by me before. 
What I done is just making sure that the program does not report the error.
   
   However, I would like to discuss with you guys about how to make changes of 
this function,  could you please give me some advices? I think this should 
create another PR for this or reopen PR #421 to correct this issue.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on issue #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on issue #435: [IOTDB-174] Fix querying timeseries 
interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#issuecomment-542953161
 
 
   Hi, I have no idea now about how to implement the interface which could show 
all device here as it was not developed by me before. What I done is just 
making sure that the program does not report the error.
   
   However, I would like to discuss with you guys about how to make changes of 
this function, could you please give me some advices? I think this should 
create another PR for this or reopen PR #421 to correct this issue.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying 
timeseries interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#discussion_r335772511
 
 

 ##
 File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
 ##
 @@ -782,20 +783,28 @@ private void findStorageGroup(MNode node, String path, 
HashSet res) {
*
* @return a list contains all distinct devices
*/
-  Set getAllDevices() {
-return new HashSet<>(getNodesList(3));
+  Set getAllDevices() throws SQLException {
+return new HashSet<>(getNodesList("root",2));
 
 Review comment:
   @LeiRui Hi, actually I have no idea now about how to implement this 
interface as it was not developed by me before. What I done is just making sure 
that the program does not report the error.
   
   However, I would like to discuss with you guys about how to make changes of 
this function,  could you please give me some advices? I think this should 
create another PR for this or reopen PR #421 to correct this issue.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying 
timeseries interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#discussion_r335772511
 
 

 ##
 File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
 ##
 @@ -782,20 +783,28 @@ private void findStorageGroup(MNode node, String path, 
HashSet res) {
*
* @return a list contains all distinct devices
*/
-  Set getAllDevices() {
-return new HashSet<>(getNodesList(3));
+  Set getAllDevices() throws SQLException {
+return new HashSet<>(getNodesList("root",2));
 
 Review comment:
   @LeiRui Hi, actually I have no idea now about how to implement this 
interface as it was not developed by me before. What I done is just making sure 
that the program does not report the error.
   
   However, I would like to discuss with you guys about how to make changes of 
this function,  could you please give me some advices? I think this should 
create another PR for this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying 
timeseries interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#discussion_r335772008
 
 

 ##
 File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
 ##
 @@ -782,20 +783,28 @@ private void findStorageGroup(MNode node, String path, 
HashSet res) {
*
* @return a list contains all distinct devices
*/
-  Set getAllDevices() {
-return new HashSet<>(getNodesList(3));
+  Set getAllDevices() throws SQLException {
+return new HashSet<>(getNodesList("root",2));
   }
 
   /**
* Get all nodes at the given level in current Metadata Tree.
*
* @return a list contains all nodes at the given level
*/
-  List getNodesList(int nodeLevel) {
+  List getNodesList(String schemaPattern, int nodeLevel) throws 
SQLException {
 List res = new ArrayList<>();
-MNode rootNode;
-if ((rootNode = getRoot()) != null) {
-  findNodes(rootNode, "root", res, nodeLevel);
+String[] nodes = schemaPattern.split("\\.");
+MNode node;
+if ((node = getRoot()) != null) {
+  for (int i = 1; i < nodes.length; i++) {
 
 Review comment:
   Done.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 removed a comment on issue #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 removed a comment on issue #435: [IOTDB-174] Fix querying timeseries 
interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#issuecomment-542696590
 
 
   Please wait a moment for this PR as my computer was crashed and was sent for 
the repair these days. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying 
timeseries interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#discussion_r335746616
 
 

 ##
 File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
 ##
 @@ -783,19 +783,23 @@ private void findStorageGroup(MNode node, String path, 
HashSet res) {
* @return a list contains all distinct devices
*/
   Set getAllDevices() {
-return new HashSet<>(getNodesList(3));
+return new HashSet<>(getNodesList("root",2));
   }
 
   /**
* Get all nodes at the given level in current Metadata Tree.
*
* @return a list contains all nodes at the given level
*/
-  List getNodesList(int nodeLevel) {
+  List getNodesList(String schemaPattern, int nodeLevel) {
 List res = new ArrayList<>();
-MNode rootNode;
-if ((rootNode = getRoot()) != null) {
-  findNodes(rootNode, "root", res, nodeLevel);
+String[] nodes = schemaPattern.split("\\.");
+MNode node;
+if ((node = getRoot()) != null) {
+  for (int i = 1; i < nodes.length; i++) {
+node = node.getChild(nodes[i]);
 
 Review comment:
   @LeiRui Hi, I have no idea about how to implement this as the function of 
showing all devices was not developed by me before. I just did some minor 
changes to ensure that it won't report the error.
   
   Could you please provide me some advices or discuss with me on how to get 
this function done? Maybe this should be on another PR. What do you guys think?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying 
timeseries interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#discussion_r335746616
 
 

 ##
 File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
 ##
 @@ -783,19 +783,23 @@ private void findStorageGroup(MNode node, String path, 
HashSet res) {
* @return a list contains all distinct devices
*/
   Set getAllDevices() {
-return new HashSet<>(getNodesList(3));
+return new HashSet<>(getNodesList("root",2));
   }
 
   /**
* Get all nodes at the given level in current Metadata Tree.
*
* @return a list contains all nodes at the given level
*/
-  List getNodesList(int nodeLevel) {
+  List getNodesList(String schemaPattern, int nodeLevel) {
 List res = new ArrayList<>();
-MNode rootNode;
-if ((rootNode = getRoot()) != null) {
-  findNodes(rootNode, "root", res, nodeLevel);
+String[] nodes = schemaPattern.split("\\.");
+MNode node;
+if ((node = getRoot()) != null) {
+  for (int i = 1; i < nodes.length; i++) {
+node = node.getChild(nodes[i]);
 
 Review comment:
   @LeiRui Hi, I have no idea about how to implement this as the function of 
showing all devices was not developed by me before. I just did some minor 
changes to ensure that it won't report the error.
   
   Could you please provide me some advices or discuss with me on how to get 
this function done? Maybe this should be on another PR. What do you guys think.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying 
timeseries interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#discussion_r335746616
 
 

 ##
 File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
 ##
 @@ -783,19 +783,23 @@ private void findStorageGroup(MNode node, String path, 
HashSet res) {
* @return a list contains all distinct devices
*/
   Set getAllDevices() {
-return new HashSet<>(getNodesList(3));
+return new HashSet<>(getNodesList("root",2));
   }
 
   /**
* Get all nodes at the given level in current Metadata Tree.
*
* @return a list contains all nodes at the given level
*/
-  List getNodesList(int nodeLevel) {
+  List getNodesList(String schemaPattern, int nodeLevel) {
 List res = new ArrayList<>();
-MNode rootNode;
-if ((rootNode = getRoot()) != null) {
-  findNodes(rootNode, "root", res, nodeLevel);
+String[] nodes = schemaPattern.split("\\.");
+MNode node;
+if ((node = getRoot()) != null) {
+  for (int i = 1; i < nodes.length; i++) {
+node = node.getChild(nodes[i]);
 
 Review comment:
   @LeiRui Hi, I have no idea about how to implement this as the function of 
showing all devices was not developed by me. I just did some minor changes to 
ensure that it won't report the error.
   
   Could you please provide me some advices or discuss with me on how to get 
this function done? Maybe this should be on another PR. What do you guys think.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on a change in pull request #435: [IOTDB-174] Fix querying 
timeseries interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#discussion_r335746616
 
 

 ##
 File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
 ##
 @@ -783,19 +783,23 @@ private void findStorageGroup(MNode node, String path, 
HashSet res) {
* @return a list contains all distinct devices
*/
   Set getAllDevices() {
-return new HashSet<>(getNodesList(3));
+return new HashSet<>(getNodesList("root",2));
   }
 
   /**
* Get all nodes at the given level in current Metadata Tree.
*
* @return a list contains all nodes at the given level
*/
-  List getNodesList(int nodeLevel) {
+  List getNodesList(String schemaPattern, int nodeLevel) {
 List res = new ArrayList<>();
-MNode rootNode;
-if ((rootNode = getRoot()) != null) {
-  findNodes(rootNode, "root", res, nodeLevel);
+String[] nodes = schemaPattern.split("\\.");
+MNode node;
+if ((node = getRoot()) != null) {
+  for (int i = 1; i < nodes.length; i++) {
+node = node.getChild(nodes[i]);
 
 Review comment:
   @LeiRui Hi,I have no idea about how to implement this as the function of 
showing all devices was not developed by me. I just did some minor changes to 
ensure that it won't report the error.
   
   Could you please provide me some advices or discuss with me on how to get 
this function done? Maybe this should be on another PR. What do you guys think.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] HTHou commented on issue #450: modify documents

2019-10-16 Thread GitBox
HTHou commented on issue #450: modify documents
URL: https://github.com/apache/incubator-iotdb/pull/450#issuecomment-542771372
 
 
   OK, thank you for letting me know. I’ll fix it ASAP.
   
   Get Outlook for iOS
   
   From: Xiangdong Huang 
   Sent: Wednesday, October 16, 2019 11:50:08 PM
   To: apache/incubator-iotdb 
   Cc: Haonan ; Author 
   Subject: Re: [apache/incubator-iotdb] modify documents (#450)
   
   
   I find that the TsFile docs are splitted into 6-API and 7-System Design. My 
questions are:
   
 *   Why TsFile's installation and usage are classified as API?
   
   Maybe the title can be "Get TsFile library" ..
   
   Hi, I do not mean to modify the file name from TsFile API to "Get TsFile 
Library". I want to say, you can modify the content of the markdown, and 
replate the title of the first chapter in it...
   
   —
   You are receiving this because you authored the thread.
   Reply to this email directly, view it on 
GitHub,
 or 
unsubscribe.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jixuan1989 commented on issue #450: modify documents

2019-10-16 Thread GitBox
jixuan1989 commented on issue #450: modify documents
URL: https://github.com/apache/incubator-iotdb/pull/450#issuecomment-542768008
 
 
   > > I find that the TsFile docs are splitted into `6-API` and `7-System 
Design`. My questions are:
   > > 
   > > * Why TsFile's installation and usage are classified as API?
   > 
   > Maybe the title can be "Get TsFile library" ..
   
   Hi, I do not mean to modify the file name from TsFile API to "Get TsFile 
Library". I want to say, you can modify the content of the markdown, and 
replate the title of the first chapter in it... 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 edited a comment on issue #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 edited a comment on issue #435: [IOTDB-174] Fix querying timeseries 
interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#issuecomment-542696590
 
 
   Please wait a moment for this PR as my computer was crashed and was sent for 
the repair these days. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] samperson1997 commented on a change in pull request #417: [IOTDB-234] Refactor TsFile storage on HDFS

2019-10-16 Thread GitBox
samperson1997 commented on a change in pull request #417: [IOTDB-234] Refactor 
TsFile storage on HDFS
URL: https://github.com/apache/incubator-iotdb/pull/417#discussion_r335488952
 
 

 ##
 File path: 
tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fileInputFactory/HDFSInputFactory.java
 ##
 @@ -17,36 +17,22 @@
  * under the License.
  */
 
-package org.apache.iotdb.tsfile.fileSystem;
+package org.apache.iotdb.tsfile.fileSystem.fileInputFactory;
 
-import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
-import java.nio.file.Paths;
-import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor;
-import org.apache.iotdb.tsfile.read.reader.DefaultTsFileInput;
 import org.apache.iotdb.tsfile.read.reader.TsFileInput;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public enum FileInputFactory {
+public class HDFSInputFactory implements FileInputFactory {
 
-  INSTANCE;
-
-  private static FSType fsType = 
TSFileDescriptor.getInstance().getConfig().getTSFileStorageFs();
-  private static final Logger logger = 
LoggerFactory.getLogger(FileInputFactory.class);
+  private static final Logger logger = 
LoggerFactory.getLogger(HDFSInputFactory.class);
   private static Class clazz;
 
 Review comment:
   Sorry for the inconsideration! I have fixed it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jack870131 commented on issue #435: [IOTDB-174] Fix querying timeseries interface cannot make a query by the specified path prefix

2019-10-16 Thread GitBox
jack870131 commented on issue #435: [IOTDB-174] Fix querying timeseries 
interface cannot make a query by the specified path prefix
URL: https://github.com/apache/incubator-iotdb/pull/435#issuecomment-542696590
 
 
   Please wait a moment for this PR as my computer was crashed these days and 
was sent for the repair these days. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] LeiRui commented on issue #429: [IOTDB-205]Support storage-group-level data ttl

2019-10-16 Thread GitBox
LeiRui commented on issue #429: [IOTDB-205]Support storage-group-level data ttl
URL: https://github.com/apache/incubator-iotdb/pull/429#issuecomment-542682698
 
 
   > And whether the data goes into sequence files or unsequence files should 
be invisible to users.
   
   I agree.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] Ring-k commented on a change in pull request #440: reconstruct antlrv3 grammar to improve performance

2019-10-16 Thread GitBox
Ring-k commented on a change in pull request #440: reconstruct antlrv3 grammar 
to improve performance
URL: https://github.com/apache/incubator-iotdb/pull/440#discussion_r335411929
 
 

 ##
 File path: server/src/main/antlr3/org/apache/iotdb/db/sql/parse/TqlParser.g
 ##
 @@ -0,0 +1,726 @@
+/**
+ * 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.
+ */
+
+parser grammar TqlParser;
+
+options {
+tokenVocab=TqlLexer;
+output=AST;
+ASTLabelType=CommonTree;
+backtrack=false;
+k=3;
+}
+
+tokens{
+TOK_CREATE;
+TOK_TIMESERIES;
+TOK_PATH;
+TOK_WITH;
+TOK_DATATYPE;
+TOK_ENCODING;
+TOK_COMPRESSOR;
+TOK_PROPERTY;
+TOK_QUERY;
+TOK_AGGREGATE;
+TOK_SELECT;
+TOK_FROM;
+TOK_ROOT;
+TOK_WHERE;
+TOK_AND;
+TOK_OR;
+TOK_NOT;
+TOK_GT;
+TOK_GTE;
+TOK_LT;
+TOK_LTE;
+TOK_EQ;
+TOK_NEQ;
+TOK_DATETIME;
+TOK_INSERT;
+TOK_INSERT_COLUMNS;
+TOK_TIME;
+TOK_INSERT_VALUES;
+TOK_UPDATE;
+TOK_SET;
+TOK_DELETE;
+TOK_LABEL;
+TOK_ADD;
+TOK_LINK;
+TOK_UNLINK;
+TOK_SHOW_METADATA;
+TOK_INDEX;
+TOK_FUNCTION;
+TOK_INDEX_KV;
+TOK_DESCRIBE;
+TOK_DROP;
+TOK_MERGE;
+TOK_LIST;
+TOK_PRIVILEGES;
+TOK_ALL;
+TOK_USER;
+TOK_ROLE;
+TOK_QUIT;
+TOK_PASSWORD;
+TOK_ALTER;
+TOK_ALTER_PSWD;
+TOK_GRANT;
+TOK_REVOKE;
+TOK_SLIMIT;
+TOK_LIMIT;
+TOK_SOFFSET;
+TOK_OFFSET;
+TOK_GROUPBY;
+TOK_TIMEUNIT;
+TOK_TIMEORIGIN;
+TOK_TIMEINTERVAL;
+TOK_FILL;
+TOK_TYPE;
+TOK_PREVIOUS;
+TOK_LINEAR;
+TOK_LOAD;
+TOK_GRANT_WATERMARK_EMBEDDING;
+TOK_REVOKE_WATERMARK_EMBEDDING;
+TOK_STORAGEGROUP;
+TOK_VALUE;
+TOK_CONSTANT;
+TOK_TIMEINTERVALPAIR;
+TOK_PROPERTY_VALUE;
+}
+
+@header{
+package org.apache.iotdb.db.sql.parse;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+}
+
+@members {
+ArrayList errors = new ArrayList();
+Stack messages = new Stack();
+private static HashMap tokenNameMap;
+static {
+tokenNameMap = new HashMap();
+tokenNameMap.put("K_AND", "AND");
+tokenNameMap.put("K_OR", "OR");
+tokenNameMap.put("K_NOT", "NOT");
+tokenNameMap.put("K_LIKE", "LIKE");
+tokenNameMap.put("K_BY", "BY");
+tokenNameMap.put("K_GROUP", "GROUP");
+   tokenNameMap.put("K_FILL", "FILL");
+   tokenNameMap.put("K_LINEAR", "LINEAR");
+   tokenNameMap.put("K_PREVIOUS", "PREVIOUS");
+   tokenNameMap.put("K_WHERE", "WHERE");
+   tokenNameMap.put("K_FROM", "FROM");
+   tokenNameMap.put("K_SELECT", "SELECT");
+   tokenNameMap.put("K_INSERT", "INSERT");
+   tokenNameMap.put("K_LIMIT","LIMIT");
+   tokenNameMap.put("K_OFFSET","OFFSET");
+   tokenNameMap.put("K_SLIMIT","SLIMIT");
+   tokenNameMap.put("K_SOFFSET","SOFFSET");
+   tokenNameMap.put("K_ON", "ON");
+   tokenNameMap.put("K_ROOT", "ROOT");
+   tokenNameMap.put("K_SHOW", "SHOW");
+   tokenNameMap.put("K_CLUSTER", "CLUSTER");
+   tokenNameMap.put("K_LOAD", "LOAD");
+   tokenNameMap.put("K_NULL", "NULL");
+   tokenNameMap.put("K_CREATE", "CREATE");
+   tokenNameMap.put("K_DESCRIBE", "DESCRIBE");
+   tokenNameMap.put("K_TO", "TO");
+   tokenNameMap.put("K_ON", "ON");
+   tokenNameMap.put("K_USING", "USING");
+   tokenNameMap.put("K_DATETIME", "DATETIME");
+   tokenNameMap.put("K_TIMESTAMP", "TIMESTAMP");
+   tokenNameMap.put("K_TIME", "TIME");
+   tokenNameMap.put("K_AGGREGATION", "CLUSTERED");
+   tokenNameMap.put("K_INTO", "INTO");
+   tokenNameMap.put("K_ROW", "ROW");
+   tokenNameMap.put("K_STORED", "STORED");
+   tokenNameMap.put("K_OF", "OF");
+   tokenNameMap.put("K_ADD", "ADD");
+   tokenNameMap.put("K_FUNCTION", "FUNCTION");
+   tokenNameMap.put("K_WITH", "WITH");
+   tokenNameMap.put("K_SET", "SET");
+   tokenNameMap.put("K_UPDATE", "UPDATE");
+   tokenNameMap.put("K_VALUES", "VALUES");
+   tokenNameMap.put("K_KEY", "KEY");
+   tokenNameMap.put("K_ENABLE", "ENABLE");
+   tokenNameMap.put("K_DISABLE", "DISABLE");
+   tokenNameMap.put("K_ALL", "ALL");
+   

[GitHub] [incubator-iotdb] Genius-pig commented on a change in pull request #440: reconstruct antlrv3 grammar to improve performance

2019-10-16 Thread GitBox
Genius-pig commented on a change in pull request #440: reconstruct antlrv3 
grammar to improve performance
URL: https://github.com/apache/incubator-iotdb/pull/440#discussion_r335405780
 
 

 ##
 File path: server/src/main/antlr3/org/apache/iotdb/db/sql/parse/TqlLexer.g
 ##
 @@ -0,0 +1,539 @@
+/**
+ * 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.
+ */
+
+lexer grammar TqlLexer;
+
+@header {
+package org.apache.iotdb.db.sql.parse;
+}
+
+//*** key words *
+K_SELECT
+: S E L E C T
+;
+
+K_INTO
+: I N T O
+;
+
+K_ROOT
+: R O O T
+;
+
+K_FROM
+: F R O M
+;
+
+K_WHERE
+: W H E R E
+;
+
+K_LIMIT
+: L I M I T
+;
+
+K_OFFSET
+: O F F S E T
+;
+
+K_SLIMIT
+: S L I M I T
+;
+
+K_SOFFSET
+: S O F F S E T
+;
+
+K_NOW
+: N O W
+;
+
+K_GROUP
+: G R O U P
+;
+
+K_BY
+: B Y
+;
+
+K_FILL
+: F I L L
+;
+
+K_PREVIOUS
+: P R E V I O U S
+;
+
+K_LINEAR
+: L I N E A R
+;
+
+K_INT32
+: I N T '3' '2'
+;
+
+K_INT64
+: I N T '6' '4'
+;
+
+K_FLOAT
+: F L O A T
+;
+
+K_DOUBLE
+: D O U B L E
+;
+
+K_BOOLEAN
+: B O O L E A N
+;
+
+K_TEXT
+: T E X T
+;
+
+K_INSERT
+: I N S E R T
+;
+
+K_VALUES
+: V A L U E S
+;
+
+K_TIMESTAMP
+: T I M E S T A M P
+;
+
+K_UPDATE
+: U P D A T E
+;
+
+K_SET
+: S E T
+;
+
+K_DELETE
+: D E L E T E
+;
+
+K_CREATE
+: C R E A T E
+;
+
+K_TIMESERIES
+: T I M E S E R I E S
+;
+
+K_WITH
+: W I T H
+;
+
+K_DATATYPE
+: D A T A T Y P E
+;
+
+K_ENCODING
+: E N C O D I N G
+;
+
+K_COMPRESSOR
+: C O M P R E S S O R
+;
+
+K_STORAGE
+: S T O R A G E
+;
+
+K_TO
+: T O
+;
+
+K_PROPERTY
+: P R O P E R T Y
+;
+
+K_LABEL
+: L A B E L
+;
+
+
+K_LINK
+: L I N K
+;
+
+K_UNLINK
+: U N L I N K
+;
+
+K_SHOW
+: S H O W
+;
+
+K_METADATA
+: M E T A D A T A
+;
+
+K_DESCRIBE
+: D E S C R I B E
+;
+
+K_INDEX
+: I N D E X
+;
+
+K_ON
+: O N
+;
+
+K_USING
+: U S I N G
+;
+
+K_DROP
+: D R O P
+;
+
+K_MERGE
+: M E R G E
+;
+
+K_LIST
+: L I S T
+;
+
+K_USER
+: U S E R
+;
+
+K_PRIVILEGES
+ : P R I V I L E G E S
+ ;
+
+K_ROLE
+: R O L E
+;
+
+K_ALL
+: A L L
+;
+
+K_OF
+: O F
+;
+
+K_QUIT
+: Q U I T
+;
+
+K_ALTER
+: A L T E R
+;
+
+K_PASSWORD
+: P A S S W O R D
+;
+
+K_GRANT
+: G R A N T
+;
+
+K_REVOKE
+: R E V O K E
+;
+
+K_PATH
+: P A T H
+;
+
+K_LOAD
+: L O A D
+;
+
+K_WATERMARK_EMBEDDING
+: W A T E R M A R K '_' E M B E D D I N G
+;
+
+//** logical operator***
+OPERATOR_AND
+: A N D
+| '&'
+| '&&'
+;
+
+OPERATOR_OR
+: O R
+| '|'
+| '||'
+;
+
+OPERATOR_NOT
+: N O T | '!'
+;
+
+
+// data type ***
+K_PLAIN
+   : P L A I N
+   ;
+K_PLAIN_DICTIONARY
+   : P L A I N '_' D I C T I O N A R Y
+   ;
+K_RLE
+   : R L E
+   ;
+K_DIFF
+   : D I F F
+   ;
+K_TS_2DIFF
+   : T S '_' '2' D I F F
+   ;
+K_BITMAP
+   : B I T M A P
+   ;
+K_GORILLA
+   : G O R I L L A
+   ;
+K_REGULAR
+   : R E G U L A R
+   ;
+
+K_ADD
+: A D D
+;
+// *** comparison ***
+OPERATOR_GT
+: '>'
+;
+
+OPERATOR_GTE
+: '>='
+;
+
+OPERATOR_LT
+: '<'
+;
+
+OPERATOR_LTE
+: '<='
+;
+
+OPERATOR_EQ
+: '=' | '=='
+;
+
+OPERATOR_NEQ
+: '!=' | '<>'
+;
+
+// operator ***
+STAR
+: '*'
+;
+
+MINUS
+: '-'
+;
+
+PLUS
+: '+'
+;
+
+DIVIDE
+: '/'
+;
+
+// symbol ***
+SEMI
+: ';'
+;
+
+DOT
+: '.'
+;
+
+COMMA
+: ','
+;
+
+LR_BRACKET
+: '('
+;
+
+RR_BRACKET
+: ')'
+;
+
+LS_BRACKET
+: '['
+;
+
+RS_BRACKET
+: ']'
+;
+
+STRING_LITERAL
+   : DQUOTA_STRING
+   | SQUOTA_STRING
+   ;
+
+fragment DQUOTA_STRING
+   : '"' ( '\\'. | '""' | ~('"'| '\\') )* '"'
+   ;
+
+fragment SQUOTA_STRING
+   : 

[GitHub] [incubator-iotdb] Ring-k commented on a change in pull request #440: reconstruct antlrv3 grammar to improve performance

2019-10-16 Thread GitBox
Ring-k commented on a change in pull request #440: reconstruct antlrv3 grammar 
to improve performance
URL: https://github.com/apache/incubator-iotdb/pull/440#discussion_r335368500
 
 

 ##
 File path: server/src/main/antlr3/org/apache/iotdb/db/sql/parse/TqlLexer.g
 ##
 @@ -0,0 +1,539 @@
+/**
+ * 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.
+ */
+
+lexer grammar TqlLexer;
+
+@header {
+package org.apache.iotdb.db.sql.parse;
+}
+
+//*** key words *
+K_SELECT
+: S E L E C T
+;
+
+K_INTO
+: I N T O
+;
+
+K_ROOT
+: R O O T
+;
+
+K_FROM
+: F R O M
+;
+
+K_WHERE
+: W H E R E
+;
+
+K_LIMIT
+: L I M I T
+;
+
+K_OFFSET
+: O F F S E T
+;
+
+K_SLIMIT
+: S L I M I T
+;
+
+K_SOFFSET
+: S O F F S E T
+;
+
+K_NOW
+: N O W
+;
+
+K_GROUP
+: G R O U P
+;
+
+K_BY
+: B Y
+;
+
+K_FILL
+: F I L L
+;
+
+K_PREVIOUS
+: P R E V I O U S
+;
+
+K_LINEAR
+: L I N E A R
+;
+
+K_INT32
+: I N T '3' '2'
+;
+
+K_INT64
+: I N T '6' '4'
+;
+
+K_FLOAT
+: F L O A T
+;
+
+K_DOUBLE
+: D O U B L E
+;
+
+K_BOOLEAN
+: B O O L E A N
+;
+
+K_TEXT
+: T E X T
+;
+
+K_INSERT
+: I N S E R T
+;
+
+K_VALUES
+: V A L U E S
+;
+
+K_TIMESTAMP
+: T I M E S T A M P
+;
+
+K_UPDATE
+: U P D A T E
+;
+
+K_SET
+: S E T
+;
+
+K_DELETE
+: D E L E T E
+;
+
+K_CREATE
+: C R E A T E
+;
+
+K_TIMESERIES
+: T I M E S E R I E S
+;
+
+K_WITH
+: W I T H
+;
+
+K_DATATYPE
+: D A T A T Y P E
+;
+
+K_ENCODING
+: E N C O D I N G
+;
+
+K_COMPRESSOR
+: C O M P R E S S O R
+;
+
+K_STORAGE
+: S T O R A G E
+;
+
+K_TO
+: T O
+;
+
+K_PROPERTY
+: P R O P E R T Y
+;
+
+K_LABEL
+: L A B E L
+;
+
+
+K_LINK
+: L I N K
+;
+
+K_UNLINK
+: U N L I N K
+;
+
+K_SHOW
+: S H O W
+;
+
+K_METADATA
+: M E T A D A T A
+;
+
+K_DESCRIBE
+: D E S C R I B E
+;
+
+K_INDEX
+: I N D E X
+;
+
+K_ON
+: O N
+;
+
+K_USING
+: U S I N G
+;
+
+K_DROP
+: D R O P
+;
+
+K_MERGE
+: M E R G E
+;
+
+K_LIST
+: L I S T
+;
+
+K_USER
+: U S E R
+;
+
+K_PRIVILEGES
+ : P R I V I L E G E S
+ ;
+
+K_ROLE
+: R O L E
+;
+
+K_ALL
+: A L L
+;
+
+K_OF
+: O F
+;
+
+K_QUIT
+: Q U I T
+;
+
+K_ALTER
+: A L T E R
+;
+
+K_PASSWORD
+: P A S S W O R D
+;
+
+K_GRANT
+: G R A N T
+;
+
+K_REVOKE
+: R E V O K E
+;
+
+K_PATH
+: P A T H
+;
+
+K_LOAD
+: L O A D
+;
+
+K_WATERMARK_EMBEDDING
+: W A T E R M A R K '_' E M B E D D I N G
+;
+
+//** logical operator***
+OPERATOR_AND
+: A N D
+| '&'
+| '&&'
+;
+
+OPERATOR_OR
+: O R
+| '|'
+| '||'
+;
+
+OPERATOR_NOT
+: N O T | '!'
+;
+
+
+// data type ***
+K_PLAIN
+   : P L A I N
+   ;
+K_PLAIN_DICTIONARY
+   : P L A I N '_' D I C T I O N A R Y
+   ;
+K_RLE
+   : R L E
+   ;
+K_DIFF
+   : D I F F
+   ;
+K_TS_2DIFF
+   : T S '_' '2' D I F F
+   ;
+K_BITMAP
+   : B I T M A P
+   ;
+K_GORILLA
+   : G O R I L L A
+   ;
+K_REGULAR
+   : R E G U L A R
+   ;
+
+K_ADD
+: A D D
+;
+// *** comparison ***
+OPERATOR_GT
+: '>'
+;
+
+OPERATOR_GTE
+: '>='
+;
+
+OPERATOR_LT
+: '<'
+;
+
+OPERATOR_LTE
+: '<='
+;
+
+OPERATOR_EQ
+: '=' | '=='
+;
+
+OPERATOR_NEQ
+: '!=' | '<>'
+;
+
+// operator ***
+STAR
+: '*'
+;
+
+MINUS
+: '-'
+;
+
+PLUS
+: '+'
+;
+
+DIVIDE
+: '/'
+;
+
+// symbol ***
+SEMI
+: ';'
+;
+
+DOT
+: '.'
+;
+
+COMMA
+: ','
+;
+
+LR_BRACKET
+: '('
+;
+
+RR_BRACKET
+: ')'
+;
+
+LS_BRACKET
+: '['
+;
+
+RS_BRACKET
+: ']'
+;
+
+STRING_LITERAL
+   : DQUOTA_STRING
+   | SQUOTA_STRING
+   ;
+
+fragment DQUOTA_STRING
+   : '"' ( '\\'. | '""' | ~('"'| '\\') )* '"'
+   ;
+
+fragment SQUOTA_STRING
+   : '\'' 

[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #431: display cache hit rate through jconsole

2019-10-16 Thread GitBox
jt2594838 commented on a change in pull request #431: display cache hit rate 
through jconsole
URL: https://github.com/apache/incubator-iotdb/pull/431#discussion_r335368074
 
 

 ##
 File path: server/src/assembly/resources/conf/logback.xml
 ##
 @@ -19,7 +19,7 @@
 under the License.
 
 -->
-
+
 
 Review comment:
   Do not forget to update the related descriptions in docs.
   
![image](https://user-images.githubusercontent.com/23610645/66906228-e8243580-f039-11e9-97ab-73b8025ad90d.png)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #431: display cache hit rate through jconsole

2019-10-16 Thread GitBox
jt2594838 commented on a change in pull request #431: display cache hit rate 
through jconsole
URL: https://github.com/apache/incubator-iotdb/pull/431#discussion_r335368074
 
 

 ##
 File path: server/src/assembly/resources/conf/logback.xml
 ##
 @@ -19,7 +19,7 @@
 under the License.
 
 -->
-
+
 
 Review comment:
   Do not forget to update the related descriptions in docs.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jixuan1989 commented on issue #452: change hadoop package name

2019-10-16 Thread GitBox
jixuan1989 commented on issue #452: change hadoop package name
URL: https://github.com/apache/incubator-iotdb/pull/452#issuecomment-542602904
 
 
   No modifications in the docs folder?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jixuan1989 commented on issue #450: modify documents

2019-10-16 Thread GitBox
jixuan1989 commented on issue #450: modify documents
URL: https://github.com/apache/incubator-iotdb/pull/450#issuecomment-542598017
 
 
   > I find that the TsFile docs are splitted into `6-API` and `7-System 
Design`. My questions are:
   > * Why TsFile's installation and usage are classified as API?
   
   Maybe the title can be "Get TsFile library" ..


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #440: reconstruct antlrv3 grammar to improve performance

2019-10-16 Thread GitBox
jt2594838 commented on a change in pull request #440: reconstruct antlrv3 
grammar to improve performance
URL: https://github.com/apache/incubator-iotdb/pull/440#discussion_r335343325
 
 

 ##
 File path: server/src/main/antlr3/org/apache/iotdb/db/sql/parse/TqlParser.g
 ##
 @@ -0,0 +1,726 @@
+/**
+ * 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.
+ */
+
+parser grammar TqlParser;
+
+options {
+tokenVocab=TqlLexer;
+output=AST;
+ASTLabelType=CommonTree;
+backtrack=false;
+k=3;
+}
+
+tokens{
+TOK_CREATE;
+TOK_TIMESERIES;
+TOK_PATH;
+TOK_WITH;
+TOK_DATATYPE;
+TOK_ENCODING;
+TOK_COMPRESSOR;
+TOK_PROPERTY;
+TOK_QUERY;
+TOK_AGGREGATE;
+TOK_SELECT;
+TOK_FROM;
+TOK_ROOT;
+TOK_WHERE;
+TOK_AND;
+TOK_OR;
+TOK_NOT;
+TOK_GT;
+TOK_GTE;
+TOK_LT;
+TOK_LTE;
+TOK_EQ;
+TOK_NEQ;
+TOK_DATETIME;
+TOK_INSERT;
+TOK_INSERT_COLUMNS;
+TOK_TIME;
+TOK_INSERT_VALUES;
+TOK_UPDATE;
+TOK_SET;
+TOK_DELETE;
+TOK_LABEL;
+TOK_ADD;
+TOK_LINK;
+TOK_UNLINK;
+TOK_SHOW_METADATA;
+TOK_INDEX;
+TOK_FUNCTION;
+TOK_INDEX_KV;
+TOK_DESCRIBE;
+TOK_DROP;
+TOK_MERGE;
+TOK_LIST;
+TOK_PRIVILEGES;
+TOK_ALL;
+TOK_USER;
+TOK_ROLE;
+TOK_QUIT;
+TOK_PASSWORD;
+TOK_ALTER;
+TOK_ALTER_PSWD;
+TOK_GRANT;
+TOK_REVOKE;
+TOK_SLIMIT;
+TOK_LIMIT;
+TOK_SOFFSET;
+TOK_OFFSET;
+TOK_GROUPBY;
+TOK_TIMEUNIT;
+TOK_TIMEORIGIN;
+TOK_TIMEINTERVAL;
+TOK_FILL;
+TOK_TYPE;
+TOK_PREVIOUS;
+TOK_LINEAR;
+TOK_LOAD;
+TOK_GRANT_WATERMARK_EMBEDDING;
+TOK_REVOKE_WATERMARK_EMBEDDING;
+TOK_STORAGEGROUP;
+TOK_VALUE;
+TOK_CONSTANT;
+TOK_TIMEINTERVALPAIR;
+TOK_PROPERTY_VALUE;
+}
+
+@header{
+package org.apache.iotdb.db.sql.parse;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+}
+
+@members {
+ArrayList errors = new ArrayList();
+Stack messages = new Stack();
+private static HashMap tokenNameMap;
+static {
+tokenNameMap = new HashMap();
+tokenNameMap.put("K_AND", "AND");
+tokenNameMap.put("K_OR", "OR");
+tokenNameMap.put("K_NOT", "NOT");
+tokenNameMap.put("K_LIKE", "LIKE");
+tokenNameMap.put("K_BY", "BY");
+tokenNameMap.put("K_GROUP", "GROUP");
+   tokenNameMap.put("K_FILL", "FILL");
+   tokenNameMap.put("K_LINEAR", "LINEAR");
+   tokenNameMap.put("K_PREVIOUS", "PREVIOUS");
+   tokenNameMap.put("K_WHERE", "WHERE");
+   tokenNameMap.put("K_FROM", "FROM");
+   tokenNameMap.put("K_SELECT", "SELECT");
+   tokenNameMap.put("K_INSERT", "INSERT");
+   tokenNameMap.put("K_LIMIT","LIMIT");
+   tokenNameMap.put("K_OFFSET","OFFSET");
+   tokenNameMap.put("K_SLIMIT","SLIMIT");
+   tokenNameMap.put("K_SOFFSET","SOFFSET");
+   tokenNameMap.put("K_ON", "ON");
+   tokenNameMap.put("K_ROOT", "ROOT");
+   tokenNameMap.put("K_SHOW", "SHOW");
+   tokenNameMap.put("K_CLUSTER", "CLUSTER");
+   tokenNameMap.put("K_LOAD", "LOAD");
+   tokenNameMap.put("K_NULL", "NULL");
+   tokenNameMap.put("K_CREATE", "CREATE");
+   tokenNameMap.put("K_DESCRIBE", "DESCRIBE");
+   tokenNameMap.put("K_TO", "TO");
+   tokenNameMap.put("K_ON", "ON");
+   tokenNameMap.put("K_USING", "USING");
+   tokenNameMap.put("K_DATETIME", "DATETIME");
+   tokenNameMap.put("K_TIMESTAMP", "TIMESTAMP");
+   tokenNameMap.put("K_TIME", "TIME");
+   tokenNameMap.put("K_AGGREGATION", "CLUSTERED");
+   tokenNameMap.put("K_INTO", "INTO");
+   tokenNameMap.put("K_ROW", "ROW");
+   tokenNameMap.put("K_STORED", "STORED");
+   tokenNameMap.put("K_OF", "OF");
+   tokenNameMap.put("K_ADD", "ADD");
+   tokenNameMap.put("K_FUNCTION", "FUNCTION");
+   tokenNameMap.put("K_WITH", "WITH");
+   tokenNameMap.put("K_SET", "SET");
+   tokenNameMap.put("K_UPDATE", "UPDATE");
+   tokenNameMap.put("K_VALUES", "VALUES");
+   tokenNameMap.put("K_KEY", "KEY");
+   tokenNameMap.put("K_ENABLE", "ENABLE");
+   tokenNameMap.put("K_DISABLE", "DISABLE");
+   tokenNameMap.put("K_ALL", "ALL");
+   

[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #417: [IOTDB-234] Refactor TsFile storage on HDFS

2019-10-16 Thread GitBox
jt2594838 commented on a change in pull request #417: [IOTDB-234] Refactor 
TsFile storage on HDFS
URL: https://github.com/apache/incubator-iotdb/pull/417#discussion_r335341957
 
 

 ##
 File path: 
tsfile/src/main/java/org/apache/iotdb/tsfile/fileSystem/fileInputFactory/HDFSInputFactory.java
 ##
 @@ -17,36 +17,22 @@
  * under the License.
  */
 
-package org.apache.iotdb.tsfile.fileSystem;
+package org.apache.iotdb.tsfile.fileSystem.fileInputFactory;
 
-import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
-import java.nio.file.Paths;
-import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor;
-import org.apache.iotdb.tsfile.read.reader.DefaultTsFileInput;
 import org.apache.iotdb.tsfile.read.reader.TsFileInput;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public enum FileInputFactory {
+public class HDFSInputFactory implements FileInputFactory {
 
-  INSTANCE;
-
-  private static FSType fsType = 
TSFileDescriptor.getInstance().getConfig().getTSFileStorageFs();
-  private static final Logger logger = 
LoggerFactory.getLogger(FileInputFactory.class);
+  private static final Logger logger = 
LoggerFactory.getLogger(HDFSInputFactory.class);
   private static Class clazz;
 
 Review comment:
   Save the constructor is better.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] SilverNarcissus opened a new pull request #453: Change spark package name

2019-10-16 Thread GitBox
SilverNarcissus opened a new pull request #453: Change spark package name
URL: https://github.com/apache/incubator-iotdb/pull/453
 
 
   change spark package name to org.apache.iotdb.spark.tsfile


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-iotdb] JackieTien97 opened a new pull request #452: change hadoop package name

2019-10-16 Thread GitBox
JackieTien97 opened a new pull request #452: change hadoop package name
URL: https://github.com/apache/incubator-iotdb/pull/452
 
 
   change 'org.apache.iotdb.tsfile.hadoop' to 'org.apahce.iotdb.hadoop.tsfile'


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services