arina-ielchiieva 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_r261616035
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/SqlRefreshMetadata.java
##########
@@ -43,15 +44,27 @@
public static final SqlSpecialOperator OPERATOR = new
SqlSpecialOperator("REFRESH_TABLE_METADATA", SqlKind.OTHER_DDL) {
@Override
public SqlCall createCall(SqlLiteral functionQualifier, SqlParserPos pos,
SqlNode... operands) {
- return new SqlRefreshMetadata(pos, (SqlIdentifier) operands[0]);
+ return new SqlRefreshMetadata(pos, (SqlIdentifier) operands[0],
(SqlLiteral) operands[1], (SqlNodeList) operands[2]);
}
};
private SqlIdentifier tblName;
+ private final SqlLiteral allColumns;
+ private final SqlNodeList fieldList;
- public SqlRefreshMetadata(SqlParserPos pos, SqlIdentifier tblName){
+ public SqlNodeList getFieldList() {
+ return fieldList;
+ }
+
+ public SqlLiteral getAllColumns() {
+ return allColumns;
Review comment:
As mentioned above this state can be determined from fieldList, no need for
second class variable.
----------------------------------------------------------------
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