Re: [DISCUSS] Support Oracle Polymorphic Table Function Syntax

2020-11-02 Thread Danny Chan
In current codebase, we actually never allows syntax like SELECT * FROM TT because of 2 reasons: 1. The parser does not allow table function calls without parenthesis 2. SqlConformace.allowNiladicParentheses default returns false In TableFunctionTest, I try to register the same name table and

[jira] [Created] (CALCITE-4373) Count(distinct Col) materialized view recognition failed

2020-11-02 Thread xzh_dz (Jira)
xzh_dz created CALCITE-4373: --- Summary: Count(distinct Col) materialized view recognition failed Key: CALCITE-4373 URL: https://issues.apache.org/jira/browse/CALCITE-4373 Project: Calcite Issue

[jira] [Created] (CALCITE-4372) Correct specification getCumulativeCost and getNonCumulativeCost so it should always produce non-nullable value

2020-11-02 Thread Vladimir Sitnikov (Jira)
Vladimir Sitnikov created CALCITE-4372: -- Summary: Correct specification getCumulativeCost and getNonCumulativeCost so it should always produce non-nullable value Key: CALCITE-4372 URL:

[jira] [Created] (CALCITE-4371) TableMacro and TableFunction should have List rather than List parameters

2020-11-02 Thread Vladimir Sitnikov (Jira)
Vladimir Sitnikov created CALCITE-4371: -- Summary: TableMacro and TableFunction should have List rather than List parameters Key: CALCITE-4371 URL: https://issues.apache.org/jira/browse/CALCITE-4371

Re: [DISCUSS] Support Oracle Polymorphic Table Function Syntax

2020-11-02 Thread Julian Hyde
Something like that. I guess if TT is a function with zero parameters and also a table, then does TT in the following refer to the function or the table? SELECT * FROM TT Note that the TT function doesn't even have to be a table function. Table functions are functions, and so are in the same

Re: [DISCUSS] Support Oracle Polymorphic Table Function Syntax

2020-11-02 Thread Danny Chan
Thanks Julian ~ > Possibly, but I'd be cautious, because the semantics become ambiguous if there are name clashes. Assumes there is a table named TT and a table function named TT(param_a, param_b), they are under the same namespace, do you mean "FROM TT(param_a, param_b)" or "FROM TT(TABLE TT,