difin commented on code in PR #5028:
URL: https://github.com/apache/hive/pull/5028#discussion_r1471757645
##########
parser/src/java/org/apache/hadoop/hive/ql/parse/AlterClauseParser.g:
##########
@@ -99,6 +100,19 @@ alterTblPartitionStatementSuffix[boolean partition]
| alterStatementSuffixAddCol
| alterStatementSuffixUpdateColumns
;
+
+optimizeTableStatementSuffix
Review Comment:
Optimize syntax as proposed in this PR is a syntactic sugar for existing
compaction syntax in Hive and it works for both Iceberg and ACID tables, but it
is meant for Iceberg tables and the reason is that many Hive competitors use
Optimize syntax for Iceberg compaction and it may help with Hive Iceberg
adoption.
We are planning to extend the support for Optimize syntax in the future to
support parameters like minimum number of files in the partition and file size
threshold parameters which will be only for Iceberg:
```
OPTIMIZE TABLE <table_name>
REWRITE DATA [USING BIN_PACK]
[ ( { FILE_SIZE_THRESHOLD | MIN_INPUT_FILES } = <value> [, ... ] ) ]
WHERE category = 'c1'
```
--
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]