how to register a udaf to calcite

2020-10-26 Thread dawangli
I hive the following code,it just valid a simple group by sql with a udaf, but i doesn't work, it seems like the calcite cannot identify the aggr udaf ,code and error displayed below code: String sql = "SELECT\n" + " dim,\n" + " aggr(val)\n" + "FROM\n" + " tb\n" + "GROUP BY\n" + " dim";

how to register udfa to calcite?

2020-10-26 Thread dawangli
I hive the following code,it just valid a simple group by sql with a udaf, but i doesn't work, it seems like the calcite cannot identify the aggr udaf ,code and error displayed below code String sql = "SELECT\n" + " dim,\n" + " aggr(val)\n" + "FROM\n" + " tb\n" + "GROUP BY\n" + " dim";

Re: Why ProjectJoinTransposeRule not in Calcite default rule set.

2020-10-26 Thread Chunwei Lei
Note that RelOptUtil#registerDefaultRules is marked as experimental and it excludes quite a few rules. It might not be as perfect as expected. Feel free to improve it if needed. Best, Chunwei On Tue, Oct 27, 2020 at 2:13 AM Rui Wang wrote: > If you include "ProjectJoinTransposeRule" as a

Re: Why ProjectJoinTransposeRule not in Calcite default rule set.

2020-10-26 Thread Rui Wang
If you include "ProjectJoinTransposeRule" as a default rule, what impact will it have? Will some unit tests need to be updated? -Rui On Mon, Oct 26, 2020 at 2:14 AM Fan Liya wrote: > I also think the ProjectJoinTransposeRule should be included in the main > optimizer process. > > Best, > Liya

[jira] [Created] (CALCITE-4357) DESCRIBE SCHEMA throws "Column not found" exception

2020-10-26 Thread David Kubecka (Jira)
David Kubecka created CALCITE-4357: -- Summary: DESCRIBE SCHEMA throws "Column not found" exception Key: CALCITE-4357 URL: https://issues.apache.org/jira/browse/CALCITE-4357 Project: Calcite

Re: List of columns that are inserted to

2020-10-26 Thread Julian Hyde
The mapping isn't as simple as you may think. Calcite checks the catalog to see whether each column has a default expression. NULL is just the default initializer expression. By the way, can access the initializer expression functionality without leaving columns out of the column list: you can

List of columns that are inserted to

2020-10-26 Thread Viliam Durina
We have a query similar to this: INSERT INTO t(c1, c2) VALUES(1, 2); However, the row type of table `t` has 3 columns: c1, c2 and c3. When we convert the SqlNode to RelNode using `SqlToRelConverter.convertQuery()`, the output is similar to this: LogicalTableModify(table=[t],

[jira] [Created] (CALCITE-4356) Support recursive queries in SqlToRel and RelToSql converters

2020-10-26 Thread Ruben Q L (Jira)
Ruben Q L created CALCITE-4356: -- Summary: Support recursive queries in SqlToRel and RelToSql converters Key: CALCITE-4356 URL: https://issues.apache.org/jira/browse/CALCITE-4356 Project: Calcite

Re: Why ProjectJoinTransposeRule not in Calcite default rule set.

2020-10-26 Thread Fan Liya
I also think the ProjectJoinTransposeRule should be included in the main optimizer process. Best, Liya Fan On Fri, Oct 23, 2020 at 10:43 AM JiaTao Tao wrote: > This rule is only used in RelOptMaterializations#substitute, is not in > Calcite's main optimizer