Conversation
| private Map<String, String> serdeProps; // only used for materialized views | ||
| private Set<String> tablesUsed; // only used for materialized views | ||
| private List<String> sortColNames; // only used for materialized views | ||
| private List<FieldSchema> sortCols; // only used for materialized views |
There was a problem hiding this comment.
I am trying to figure out why is this required? Can sortColNames be not used wherever sortCols is required?
There was a problem hiding this comment.
You are right, this is not really required. We only use it to print the column names together with their types in the explain for CREATE MATERIALIZED VIEW statement. Logic is similar to partition columns, this will only be needed if we store these columns as entries in the SORT / BUCKET columns in metastore (as we do for normal tables), but currently we do not do that.
| if (destinationTable.isMaterializedView() && | ||
| mvRebuildMode == MaterializationRebuildMode.INSERT_OVERWRITE_REBUILD) { | ||
| // Data organization (DISTRIBUTED, SORTED, CLUSTERED) for materialized view | ||
| // TODO: We only do this for a full rebuild |
There was a problem hiding this comment.
CLUSTERED ON SORTED ON will be silently ignored for rest of the build types. Do you think it is good idea to log warning in that case?
There was a problem hiding this comment.
I think a WARN may be too aggressive, since there is nothing wrong in the system, it is just a feature that is missing (incremental maintenance of the view does not organize the new data according to the spec). I will add a DEBUG message though.
There was a problem hiding this comment.
I was thinking about this and there is no need to log this info. This is a missing feature, and there is a TODO and a follow-up JIRA (https://issues.apache.org/jira/browse/HIVE-21953).
…lized views (Jesus Camacho Rodriguez, reviewed by Vineet Garg) Close apache#696
…or materialized views (Jesus Camacho Rodriguez, reviewed by Vineet Garg) Close apache#696 Change-Id: I36e63b2d4591027f10d43e286c19cd6179fbf4f3
No description provided.