zhangbutao commented on code in PR #5541:
URL: https://github.com/apache/hive/pull/5541#discussion_r1868825709


##########
parser/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g:
##########
@@ -1840,6 +1841,14 @@ tableImplBuckets
     -> ^(TOK_ALTERTABLE_BUCKETS $num)
     ;
 
+tableWriteOrdered
+@init { pushMsg("table sorted specification", state); }
+@after { popMsg(state); }
+    :
+      KW_WRITE KW_ORDERED KW_BY sortCols=columnNameOrderList

Review Comment:
   BTW, Trino added the `write-sort ` through table property:
   https://trino.io/docs/current/connector/iceberg.html#sorted-tables
   
https://www.starburst.io/blog/improving-performance-with-iceberg-sorted-tables/
   
   
   ```
   CREATE TABLE
   catalog_sales_sorted (
      cs_sold_date_sk bigint,
      more columns...
   )
   WITH
   (
      format = 'PARQUET',
      sorted_by = ARRAY['cs_sold_date_sk'],
      type = 'ICEBERG'
   )
   ```
   
   This can avoid introducing new create syntax. Anyway, we should find a 
simple syntax which user can use.
   
   I also want to hear other folks opinions about the syntax. 
   cc @ayushtkn @deniskuzZ @okumin 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to