The hint specifies that the data fed into the table sink should be clustered based on the partition columns.
For now, we'll use a local sort to achieve clustering, and the plan should look like this:
SCAN -> SORT (year,month) -> TABLE SINK
- We will not support the legacy-hint style with brackets
- The hint should be obeyed if the target table is a partitioned HDFS or Kudu table. Otherwise, it should be ignored with a warning.
- For Kudu tables, the sorting should be done on the primary keys.
Eventually, we want to make the "clustered" plan the default because it is more robust with large inserts into many partitions. With that in mind, we should also add a corresponding "noclustered" hint that removes the sort. Of course, that hint will not do anything until we change the default behavior, but we should add it nevertheless to have the hints complete.