[
https://issues.apache.org/jira/browse/CALCITE-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928276#comment-16928276
]
Kenneth Knowles commented on CALCITE-3339:
------------------------------------------
A `DESCRIPTOR` parameter expression seems only really applicable for opaque
table functions defined outside SQL. The standard and Oracle lack reasonable
syntax for using such a value in a SQL query. So a string is not much worse. It
is less obvious that it is statically type-checkable, but you still can and
would want to. So you might as well parse the keyword DESCRIPTOR and make it
obvious it is an identifier with a binding site. That binding site is the
other, mandatory, table parameter to the function. Notably, the keyword is not
permissible except as an immediate literal parameter.
> 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
>
> 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.2#803003)