RE: Algebraic optimizations rule

2023-06-02 Thread mbudiu
I have seen the constant folding rules you mention in [2], but these seen to require all operands to be compile-time known. Algebraic optimization rules can work even when only some of the operands are constant, such as addition of an arbitrary expression with zero. I will take a look at the

Re: Algebraic optimizations rule

2023-06-02 Thread Jiajun Xie
Hello, mbudiu: Based on my experience, constant folding can occur in two stages. - Enable it by `RelBuilder$Config$withSimplify`[1] in the convert stage - Add `RelOptRules$CONSTANT_REDUCTION_RULES`[2] in the optimize stage If your RexNode is not complex, you can directly use RexSimplify. For

[jira] [Created] (CALCITE-5747) FLOOR() return type differs from BigQuery

2023-06-02 Thread Tanner Clary (Jira)
Tanner Clary created CALCITE-5747: - Summary: FLOOR() return type differs from BigQuery Key: CALCITE-5747 URL: https://issues.apache.org/jira/browse/CALCITE-5747 Project: Calcite Issue Type:

Algebraic optimizations rule

2023-06-02 Thread mbudiu
Hello, I was looking for rules that apply algebraic optimizations to RexNode expressions, such as 0 + x = x, but I couldn't find any. Is there such a rule? Mihai

[jira] [Created] (CALCITE-5746) Support JDK 19

2023-06-02 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5746: Summary: Support JDK 19 Key: CALCITE-5746 URL: https://issues.apache.org/jira/browse/CALCITE-5746 Project: Calcite Issue Type: Bug Reporter:

[jira] [Created] (CALCITE-5745) CONCAT2 function(enabled in Oracle library) gets wrong result when one of the argument is NULL

2023-06-02 Thread ZheHu (Jira)
ZheHu created CALCITE-5745: -- Summary: CONCAT2 function(enabled in Oracle library) gets wrong result when one of the argument is NULL Key: CALCITE-5745 URL: https://issues.apache.org/jira/browse/CALCITE-5745

[jira] [Created] (CALCITE-5744) Add STR_TO_MAP for Spark dialect

2023-06-02 Thread jackylau (Jira)
jackylau created CALCITE-5744: - Summary: Add STR_TO_MAP for Spark dialect Key: CALCITE-5744 URL: https://issues.apache.org/jira/browse/CALCITE-5744 Project: Calcite Issue Type: Improvement

[jira] [Created] (CALCITE-5743) An error occurs when count appears in the correlated subquery select list

2023-06-02 Thread libopeng (Jira)
libopeng created CALCITE-5743: - Summary: An error occurs when count appears in the correlated subquery select list Key: CALCITE-5743 URL: https://issues.apache.org/jira/browse/CALCITE-5743 Project:

[jira] [Created] (CALCITE-5742) SubstitutionVisitor Causes Infinite Loop when using AggregateOnCalcToAggregateUnifyRule

2023-06-02 Thread junheleo (Jira)
junheleo created CALCITE-5742: - Summary: SubstitutionVisitor Causes Infinite Loop when using AggregateOnCalcToAggregateUnifyRule Key: CALCITE-5742 URL: https://issues.apache.org/jira/browse/CALCITE-5742

[jira] [Created] (CALCITE-5741) Add support for MSSQL CONCAT_WS function

2023-06-02 Thread ZheHu (Jira)
ZheHu created CALCITE-5741: -- Summary: Add support for MSSQL CONCAT_WS function Key: CALCITE-5741 URL: https://issues.apache.org/jira/browse/CALCITE-5741 Project: Calcite Issue Type: Improvement