mirror of
https://github.com/apache/impala.git
synced 2026-01-26 03:01:30 -05:00
When inserting to a partitioned hdfs table, the planner will add a sort node on top of the plan, depending on the clustered/noclustered plan hint and on the 'sort.columns' table property. If clustering is enabled in insertStmt or additional columns are specified in the 'sort.columns' table property, then the ordering columns will start with the clustering columns, so that partitions can be written sequentially in the table sink. Any additional non-clustering columns specified by the 'sort.columns' property will be added to the ordering columns and after any clustering columns. For Z-order sort type, we should deal with these ordering columns separately. The clustering columns should still be sorted lexically, and only the remaining ordering columns be sorted in Z-order. So we can still insert partitions one by one and avoid hitting the DCHECK as described in the JIRA. Tests - Add tests for inserting to a partitioned table with zorder. Change-Id: I30cbad711167b8b63c81837e497b36fd41be9b54 Reviewed-on: http://gerrit.cloudera.org:8080/16590 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>