You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Rui Wang (Jira)" <ji...@apache.org> on 2020/04/29 23:04:00 UTC

[jira] [Updated] (CALCITE-3964) Support in DESCRIPTOR operator

     [ https://issues.apache.org/jira/browse/CALCITE-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rui Wang updated CALCITE-3964:
------------------------------
    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>
{code:java}
<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> ]
{code}

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.


  was:
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: 

{code:sql}
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> ]
{code}

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.



> Support <data type> in DESCRIPTOR operator 
> -------------------------------------------
>
>                 Key: CALCITE-3964
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3964
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>
> 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>
> {code:java}
> <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> ]
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)