[
https://issues.apache.org/jira/browse/CALCITE-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16979561#comment-16979561
]
Julian Hyde commented on CALCITE-3339:
--------------------------------------
Reviewing your [PR 1599|https://github.com/apache/calcite/pull/1599]:
* It would be good to isolate 'Add DESCRIPTOR' in its own change, including
the DESCRIPTOR operator in SqlStdOperatorTable, but not linked to the TUMBLE
function.
* Add a test to SqlParserTest (yes, I know that you accomplished this without
changing the parser, and that's great, but it impinges on the parser's area of
functionality).
* Needs more (user and developer) documentation about what a descriptor is.
* The return type of the DESCRIPTOR function should be something special. I
think SqlTypeName.COLUMN_LIST will do.
* Also add a validator test that calls a UDF with a DESCRIPTOR argument. You
may need a special type that identifies an argument of a UDF as a descriptor;
if so, add class org.apache.calcite.runtime.Descriptor.
* It's sufficient for this change to do parsing and validation. Don't need to
do SqlToRel or execution.
> DESCRIPTOR as a SQL operator in SqlStdOperatorTable
> ---------------------------------------------------
>
> Key: CALCITE-3339
> URL: https://issues.apache.org/jira/browse/CALCITE-3339
> Project: Calcite
> Issue Type: Sub-task
> Reporter: Rui Wang
> Assignee: Rui Wang
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> For query:
> SELECT *
> FROM TABLE(TUMBLE_TVF(
> TABLE ORDERS,
> DESCRIPTOR(ROWTIME),
> INTERVAL '10' MINUTE))
> TABLE ORDERS is converted to SqlPrefixOperator, but DESCRIPTOR(ROWTIME) has
> no mapping in SqlStdOperatorTable.
> There are two options:
> 1. There is a SqlColumnListConstructor which serves the same(similar) purpose
> to specific a list of column.
> 2. We create a new operator for DESCRIPTOR.
> Reuse existing code is always good so we can start from option one and see if
> it works.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)