Zoltán Rátkai created HIVE-28587:
------------------------------------

             Summary: Support write order for Iceberg tables at ALTER TABLE
                 Key: HIVE-28587
                 URL: https://issues.apache.org/jira/browse/HIVE-28587
             Project: Hive
          Issue Type: Improvement
      Security Level: Public (Viewable by anyone)
          Components: Hive
            Reporter: Zoltán Rátkai
            Assignee: Zoltán Rátkai


h3. Add support for:

Iceberg tables can be configured with a sort order that is used to 
automatically sort data that is written to the table in some engines. For 
example, {{MERGE INTO}} in Spark will use the table ordering.

{{}}

Iceberg tables can be configured with a sort order that is used to 
automatically sort data that is written to the table in some engines. For 
example, {{MERGE INTO}} in Spark will use the table ordering.

{{}}

To set the write order for a table, use {{{}WRITE ORDERED BY{}}}:
 
ALTER TABLE prod.db.sample WRITE ORDERED BY category, id
- use optional ASC/DEC keyword to specify sort order of each field (default 
ASC)}}
ALTER TABLE prod.db.sample WRITE ORDERED BY category ASC, id 
- use optional NULLS FIRST/NULLS LAST keyword to specify null order of each 
field (default FIRST)}}
ALTER TABLE prod.db.sample WRITE ORDERED BY category ASC NULLS LAST, id DESC 
NULLS FIRST

{{}}

Align the syntax based on compatibility.

{{}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to