drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] dvjyothsna commented on a change in pull request #1666: DRILL-7058: Refresh command to support subset of columns
Date Fri, 01 Mar 2019 19:42:08 GMT
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_r261733762
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/RefreshMetadataHandler.java
 ##########
 @@ -130,5 +140,25 @@ public PhysicalPlan getPlan(SqlNode sqlNode) throws ForemanSetupException
{
     }
   }
 
+  private Set<String> getColumnRootSegments(SqlNodeList columnList) {
+    Set<String> columnSet = new HashSet<>();
+    if (columnList != null) {
+      for (SqlNode column : columnList.getList()) {
+        // Add only the root segment. Collect metadata for all the columns under that root
segment
+        columnSet.add(SchemaPath.parseFromString(column.toString()).getRootSegmentPath());
+      }
+    }
+    return columnSet;
+  }
+
+  /* Generates the column list specified in the Refresh statement */
+  private SqlNodeList getColumnList(final SqlRefreshMetadata sqlrefreshMetadata) {
+    SqlNodeList columnList = sqlrefreshMetadata.getFieldList();
+    if (columnList == null || columnList.size() <= 0) {
 
 Review comment:
   I don't think isEmpty() method exists for SqlNodeList class.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message