Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
DESCRIPTOR can include an optional data type, which will enable type checking in SQL validator. It is useful for streaming windowing: the windowing is required to be applied on TIMESTAMP type, and we can rely on descriptor to do type validation.
The following is copied from SQL standard 2016:
8.15 <descriptor argument>
<descriptor argument> ::= <descriptor value constructor> <descriptor value constructor> ::= DESCRIPTOR <left paren> <descriptor column list> <right paren> <descriptor column list> ::= <descriptor column specification> [ { <comma> <descriptor column specification> }... ] <descriptor column specification> ::= <column name> [ <data type> ]
A <descriptor argument> is the keyword DESCRIPTOR followed by a parenthesized list of column names; each column name may optionally have a data type. If every column name has a data type, then the descriptor describes a row type. In the examples, CSVreader and Pivot use descriptor arguments that are just lists of column names; ExecR is an example that uses a descriptor to pass a complete row type.
Attachments
Issue Links
- is a child of
-
CALCITE-2270 [SQL:2016] Polymorphic table functions
-
- Open
-