okumin commented on code in PR #5541:
URL: https://github.com/apache/hive/pull/5541#discussion_r1879300721
##########
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:
JFYI, I heard Trino would support some detailed properties and verified the
behavior.
```
trino> CREATE TABLE iceberg.default.test1(a int) WITH (sorted_by =
ARRAY['a']);
CREATE TABLE
trino> CREATE TABLE iceberg.default.test2(a int) WITH (sorted_by = ARRAY['a
DESC NULLS FIRST']);
CREATE TABLE
```
```
$ hdfs dfs -cat
/user/hive/warehouse/test1-d38df51e56ee445aa4b100fc6306cd78/metadata/00000-77ea73cf-95ec-44fc-bf47-2287e19a4195.metadata.json
...
"default-sort-order-id" : 1,
"sort-orders" : [ {
"order-id" : 1,
"fields" : [ {
"transform" : "identity",
"source-id" : 1,
"direction" : "asc",
"null-order" : "nulls-first"
} ]
} ],
```
```
$ hdfs dfs -cat
/user/hive/warehouse/test2-1d2d11372fad4f3e945d298f63afe322/metadata/00000-62c0c21b-2032-4883-a092-012bd1572e83.metadata.json
...
"default-sort-order-id" : 1,
"sort-orders" : [ {
"order-id" : 1,
"fields" : [ {
"transform" : "identity",
"source-id" : 1,
"direction" : "desc",
"null-order" : "nulls-first"
} ]
} ],
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]