dvjyothsna commented on a change in pull request #1666: DRILL-7058: Refresh 
command to support subset of columns
URL: https://github.com/apache/drill/pull/1666#discussion_r261732841
 
 

 ##########
 File path: exec/java-exec/src/main/codegen/includes/parserImpls.ftl
 ##########
 @@ -464,22 +464,30 @@ SqlNode SqlDropSchema(SqlParserPos pos) :
 
 /**
  * Parse refresh table metadata statement.
- * REFRESH TABLE METADATA tblname
+ * REFRESH TABLE METADATA [COLUMNS ((field1, field2,..) | NONE)] tblname
  */
 SqlNode SqlRefreshMetadata() :
 {
     SqlParserPos pos;
     SqlIdentifier tblName;
-    SqlNodeList fieldList;
+    SqlNodeList fieldList = null;
     SqlNode query;
+    boolean allColumns = true;
 }
 {
     <REFRESH> { pos = getPos(); }
     <TABLE>
     <METADATA>
+    [
+        <COLUMNS> { allColumns = false; }
+        (   fieldList = ParseRequiredFieldList("Table")
+            |
+            <NONE>
 
 Review comment:
   Yes, since the columns keyword is optional, metadata will be collected for 
all the columns if the Columns keyword is not present. So the only way to 
express not to collect metadata for any column is to have NONE keyword which 
makes it more explicit.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to