JinkunLiu commented on code in PR #3947:
URL: https://github.com/apache/calcite/pull/3947#discussion_r2607809698


##########
core/src/main/java/org/apache/calcite/sql/fun/SqlItemOperator.java:
##########
@@ -136,7 +137,8 @@ private static SqlSingleOperandTypeChecker 
getChecker(SqlCallBinding callBinding
     if (name.equals("ITEM")) {
       return "<ARRAY>[<INTEGER>]\n"
           + "<MAP>[<ANY>]\n"
-          + "<ROW>[<CHARACTER>|<INTEGER>]";
+          + "<ROW>[<CHARACTER>|<INTEGER>]\n"
+          + "<VARIANT>[<ANY>]";

Review Comment:
   You're right — in Snowflake, a VARIANT value can be an OBJECT (map) or an 
ARRAY. However, a Snowflake OBJECT is a special kind of map: its keys must be 
strings and its values are VARIANTs (i.e., map<string, VARIANT>). See 
Snowflake's documentation: 
https://docs.snowflake.com/en/sql-reference/data-types-semistructured#object
   
   ```
   In Snowflake's semi-structured OBJECT data, each key is of type VARCHAR and 
each value is of type VARIANT.
   ```



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

Reply via email to