wForget opened a new issue, #8448:
URL: https://github.com/apache/iceberg/issues/8448

   ### Feature Request / Improvement
   
   Iceberg spark procedure argument does not support empty map or empty array.
   
   reproduce:
   
   ```
   CREATE TABLE wangzhen_test_20230901_t4 (id bigint, name string);
   INSERT INTO wangzhen_test_20230901_t4 VALUES (4, 'd'),(5, 'e'),(6, 'f');
   CALL iceberg_catalog.system.migrate('wangzhen_test_20230901_t4', map(), 
true);
   ```
   
   error msg
   
   ```
   org.apache.spark.sql.catalyst.parser.extensions.IcebergParseException: 
   mismatched input ')' expecting {'ADD', 'ALTER', 'AS', 'ASC', 'BRANCH', 'BY', 
'CALL', 'DAYS', 'DESC', 'DISTRIBUTED', 'DROP', 'EXISTS', 'FIELD', 'FIELDS', 
'FIRST', 'HOURS', 'IF', 'LAST', 'LOCALLY', 'MINUTES', 'MONTHS', 'CREATE', 
'NOT', 'NULLS', 'OF', 'OR', 'ORDERED', 'PARTITION', 'REPLACE', 'RETAIN', 
'IDENTIFIER', 'SET', 'SNAPSHOT', 'SNAPSHOTS', 'TABLE', 'TAG', 'UNORDERED', 
'VERSION', 'WITH', 'WRITE', 'TRUE', 'FALSE', 'MAP', '-', STRING, 
BIGINT_LITERAL, SMALLINT_LITERAL, TINYINT_LITERAL, INTEGER_VALUE, 
EXPONENT_VALUE, DECIMAL_VALUE, FLOAT_LITERAL, DOUBLE_LITERAL, 
BIGDECIMAL_LITERAL, IDENTIFIER, BACKQUOTED_IDENTIFIER}
   == SQL ==
   CALL iceberg_catalog.system.migrate('wangzhen_test_20230901_t4', map(), true)
        at 
org.apache.spark.sql.catalyst.parser.extensions.IcebergParseException.withCommand(IcebergSparkSqlExtensionsParser.scala:393)
        at 
org.apache.spark.sql.catalyst.parser.extensions.IcebergSparkSqlExtensionsParser.parse(IcebergSparkSqlExtensionsParser.scala:252)
        at 
org.apache.spark.sql.catalyst.parser.extensions.IcebergSparkSqlExtensionsParser.parsePlan(IcebergSparkSqlExtensionsParser.scala:129)
        at 
org.apache.spark.sql.SparkSession.$anonfun$sql$2(SparkSession.scala:633)
        at 
org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:111)
        at 
org.apache.spark.sql.SparkSession.$anonfun$sql$1(SparkSession.scala:632)
        at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:827)
        at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:630)
        at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:671)
   ```
   
   Although we can avoid it with named arguments, like:
   
   ```
   CALL iceberg_catalog.system.migrate(table => 'wangzhen_test_20230901_t4', 
drop_backup => true);
   ```
   
   ### Query engine
   
   Spark


-- 
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]

Reply via email to