Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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

            Activity

              People

              • Assignee:
                amaliujia Rui Wang
                Reporter:
                amaliujia Rui Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: