[
https://issues.apache.org/jira/browse/CALCITE-5570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17699545#comment-17699545
]
Stamatis Zampetakis commented on CALCITE-5570:
----------------------------------------------
In Hive:
Type constructors are using parentheses:
https://cwiki.apache.org/confluence/display/hive/languagemanual+udf#LanguageManualUDF-ComplexTypeConstructors
Type definitions are using angle brackets
(https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl) in DDL:
{noformat}
data_type
: primitive_type
| array_type
| map_type
| struct_type
| union_type -- (Note: Available in Hive 0.7.0 and later)
array_type
: ARRAY < data_type >
map_type
: MAP < primitive_type, data_type >
struct_type
: STRUCT < col_name : data_type [COMMENT col_comment], ...>
union_type
: UNIONTYPE < data_type, data_type, ... >
{noformat}
but casts to complex types are not allowed.
> Support nested map type for SqlDataTypeSpec
> -------------------------------------------
>
> Key: CALCITE-5570
> URL: https://issues.apache.org/jira/browse/CALCITE-5570
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Sergey Nuyanzin
> Assignee: Jiajun Xie
> Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> There was added a similar support for arrays/multisets at
> https://issues.apache.org/jira/browse/CALCITE-3250
> however there is no support for maps so far.
> The issue is to add such support.
>
> I think I'd like to clarify is syntax for maps since it has 2 internal
> subtypes for keys and values may be something similar to ROW with delimiter
> like
> {code:sql}
> SELECT CAST(NULL AS MAP(INT, INT));
> -- or with square brackets similar to map constructor
> SELECT CAST(NULL AS MAP[INT, INT]);
> -- or with angle (Flink syntax)
> SELECT CAST(NULL AS MAP<INT, INT>);
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)