Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
kramerul commented on PR #3658: URL: https://github.com/apache/calcite/pull/3658#issuecomment-1921384505 Closing this PR in favor of a new one. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to

Re: [PR] CALCITE-5647 Use mq.getRowCount(rel) instead of rel.estimateRowCount(mq) [calcite]

2024-02-01 Thread via GitHub
rubenada commented on PR #3632: URL: https://github.com/apache/calcite/pull/3632#issuecomment-1921499432 LGTM. @jduo , Just to avoid confusion, would it be possible to align commit message with PR title and Jira title? -- This is an automated message from the Apache Git Service. To

Re: [PR] [CALCITE-6234] Add Test on SqlOperatorTest for format_date function(enable Bigquery and pg) [calcite]

2024-02-01 Thread via GitHub
rubenada commented on PR #3659: URL: https://github.com/apache/calcite/pull/3659#issuecomment-1921625030 Thanks for the clarification @caicancai about the related PR I'm a bit confused, because the Jira title & description (and the PR title and commit message) talk about

Re: [PR] [CALCITE-6224] Add LOG2 function (enabled in Mysql, Spark library) [calcite]

2024-02-01 Thread via GitHub
caicancai commented on code in PR #3648: URL: https://github.com/apache/calcite/pull/3648#discussion_r1474711660 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -6188,6 +6188,65 @@ void checkRegexpExtract(SqlOperatorFixture f0, FunctionAlias

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
kramerul closed pull request #3658: [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times URL: https://github.com/apache/calcite/pull/3658 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
sonarcloud[bot] commented on PR #3664: URL: https://github.com/apache/calcite/pull/3664#issuecomment-1921528712 ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate

Re: [PR] [CALCITE-6236] EnumerableBatchNestedLoopJoin uses wrong row count for cost calculation [calcite]

2024-02-01 Thread via GitHub
rubenada commented on code in PR #3661: URL: https://github.com/apache/calcite/pull/3661#discussion_r1474483811 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableBatchNestedLoopJoin.java: ## @@ -63,9 +64,11 @@ protected EnumerableBatchNestedLoopJoin(

[PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
kramerul opened a new pull request, #3664: URL: https://github.com/apache/calcite/pull/3664 (no comment) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe,

Re: [PR] [CALCITE-6234] Add Test on SqlOperatorTest for format_date function(enable Bigquery and pg) [calcite]

2024-02-01 Thread via GitHub
caicancai commented on PR #3659: URL: https://github.com/apache/calcite/pull/3659#issuecomment-1921560147 At that time I forgot to add tests in sqloperatortest -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the

Re: [PR] [CALCITE-6234] Add Test on SqlOperatorTest for format_date function(enable Bigquery and pg) [calcite]

2024-02-01 Thread via GitHub
caicancai commented on PR #3659: URL: https://github.com/apache/calcite/pull/3659#issuecomment-1921558777 > > I have to admit that this is a problem left by my previous PR, and I'm sorry for that. > > What previous PR? Is

Re: [PR] [CALCITE-6224] Add LOG2 function (enabled in Mysql, Spark library) [calcite]

2024-02-01 Thread via GitHub
tanclary commented on code in PR #3648: URL: https://github.com/apache/calcite/pull/3648#discussion_r1474685867 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -6188,6 +6188,65 @@ void checkRegexpExtract(SqlOperatorFixture f0, FunctionAlias

Re: [PR] [CALCITE-6224] Add LOG2 function (enabled in Mysql, Spark library) [calcite]

2024-02-01 Thread via GitHub
caicancai commented on code in PR #3648: URL: https://github.com/apache/calcite/pull/3648#discussion_r1474701648 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -6188,6 +6188,65 @@ void checkRegexpExtract(SqlOperatorFixture f0, FunctionAlias

Re: [PR] [CALCITE-6234] Add Test on SqlOperatorTest for format_date function(enable Bigquery and pg) [calcite]

2024-02-01 Thread via GitHub
rubenada commented on PR #3659: URL: https://github.com/apache/calcite/pull/3659#issuecomment-1921402124 > I have to admit that this is a problem left by my previous PR, and I'm sorry for that. What previous PR? Is [CALCITE-6234](https://issues.apache.org/jira/browse/CALCITE-6234)

Re: [PR] [CALCITE-6236] EnumerableBatchNestedLoopJoin uses wrong row count for cost calculation [calcite]

2024-02-01 Thread via GitHub
zabetak commented on code in PR #3661: URL: https://github.com/apache/calcite/pull/3661#discussion_r1474526470 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableBatchNestedLoopJoin.java: ## @@ -55,6 +55,7 @@ public class EnumerableBatchNestedLoopJoin

Re: [PR] [CALCITE-6234] Add Test on SqlOperatorTest for format_date function(enable Bigquery and pg) [calcite]

2024-02-01 Thread via GitHub
caicancai commented on PR #3659: URL: https://github.com/apache/calcite/pull/3659#issuecomment-1921654956 > Thanks for the clarification @caicancai about the related PR > > I'm a bit confused, because the Jira title & description (and the PR title and commit message) talk about

Re: [PR] [CALCITE-6224] Add LOG2 function (enabled in Mysql, Spark library) [calcite]

2024-02-01 Thread via GitHub
caicancai commented on code in PR #3648: URL: https://github.com/apache/calcite/pull/3648#discussion_r1472236067 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -6188,6 +6188,65 @@ void checkRegexpExtract(SqlOperatorFixture f0, FunctionAlias

Re: [PR] [CALCITE-6224] Add LOG2 function (enabled in Mysql, Spark library) [calcite]

2024-02-01 Thread via GitHub
caicancai commented on PR #3648: URL: https://github.com/apache/calcite/pull/3648#issuecomment-1921316637 @mihaibudiu Maybe I need your opinion if you have time, thank you -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub

Re: [PR] [CALCITE-6236] EnumerableBatchNestedLoopJoin uses wrong row count for cost calculation [calcite]

2024-02-01 Thread via GitHub
JiajunBernoulli commented on code in PR #3661: URL: https://github.com/apache/calcite/pull/3661#discussion_r1474422218 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableBatchNestedLoopJoin.java: ## @@ -63,9 +64,11 @@ protected EnumerableBatchNestedLoopJoin(

Re: [PR] [CALCITE-2067] RexLiteral cannot represent accurately floating point values, including NaN, Infinity [calcite]

2024-02-01 Thread via GitHub
sonarcloud[bot] commented on PR #3663: URL: https://github.com/apache/calcite/pull/3663#issuecomment-1921959086 ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate

Re: [PR] [CALCITE-5647] Use mq.getRowCount(rel) instead of rel.estimateRowCount(mq) [calcite]

2024-02-01 Thread via GitHub
jduo commented on PR #3632: URL: https://github.com/apache/calcite/pull/3632#issuecomment-1921996618 @rubenada , I've made the commit and PR have the same title. Should the JIRA have the same title now? It states the problem whereas the commit/PR describe what changed. -- This is an

Re: [PR] [CALCITE-6224] Add LOG2 function (enabled in Mysql, Spark library) [calcite]

2024-02-01 Thread via GitHub
mihaibudiu commented on code in PR #3648: URL: https://github.com/apache/calcite/pull/3648#discussion_r1474973925 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -6188,6 +6188,67 @@ void checkRegexpExtract(SqlOperatorFixture f0, FunctionAlias

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
mihaibudiu commented on code in PR #3664: URL: https://github.com/apache/calcite/pull/3664#discussion_r1474977545 ## core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java: ## @@ -437,11 +437,43 @@ public Result visit(Filter e) { final Result x =

Re: [PR] [CALCITE-5647] Use mq.getRowCount(rel) instead of rel.estimateRowCount(mq) [calcite]

2024-02-01 Thread via GitHub
sonarcloud[bot] commented on PR #3632: URL: https://github.com/apache/calcite/pull/3632#issuecomment-1922050930 ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate

Re: [PR] [CALCITE-6224] Add LOG2 function (enabled in Mysql, Spark library) [calcite]

2024-02-01 Thread via GitHub
tanclary commented on code in PR #3648: URL: https://github.com/apache/calcite/pull/3648#discussion_r1474830504 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -6188,6 +6188,65 @@ void checkRegexpExtract(SqlOperatorFixture f0, FunctionAlias

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
sonarcloud[bot] commented on PR #3664: URL: https://github.com/apache/calcite/pull/3664#issuecomment-1922883755 ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate

Re: [PR] [CALCITE-2067] RexLiteral cannot represent accurately floating point values, including NaN, Infinity [calcite]

2024-02-01 Thread via GitHub
sonarcloud[bot] commented on PR #3663: URL: https://github.com/apache/calcite/pull/3663#issuecomment-1922604110 ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate

Re: [PR] [CALCITE-2067] RexLiteral cannot represent accurately floating point values, including NaN, Infinity [calcite]

2024-02-01 Thread via GitHub
mihaibudiu commented on PR #3663: URL: https://github.com/apache/calcite/pull/3663#issuecomment-1922637894 @julianhyde I hope to have addressed your comments. This is a breaking change in some respect; one can see how the Druid Adapter code had to be modified to accommodate this change.

Re: [PR] [CALCITE-6218] RelToSqlConverter fails to convert correlated lateral joins [calcite]

2024-02-01 Thread via GitHub
JiajunBernoulli commented on PR #3656: URL: https://github.com/apache/calcite/pull/3656#issuecomment-1922650184 I noticed that we are still discussing in Jira, so marked it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and

Re: [PR] [CALCITE-6236] EnumerableBatchNestedLoopJoin uses wrong row count for cost calculation [calcite]

2024-02-01 Thread via GitHub
YiwenWu commented on code in PR #3661: URL: https://github.com/apache/calcite/pull/3661#discussion_r1474392304 ## core/src/main/java/org/apache/calcite/rel/metadata/RelMdRowCount.java: ## @@ -181,6 +182,11 @@ public Double getRowCount(Calc rel, RelMetadataQuery mq) {

Re: [PR] [CALCITE-6236] EnumerableBatchNestedLoopJoin uses wrong row count for cost calculation [calcite]

2024-02-01 Thread via GitHub
YiwenWu commented on code in PR #3661: URL: https://github.com/apache/calcite/pull/3661#discussion_r1474392304 ## core/src/main/java/org/apache/calcite/rel/metadata/RelMdRowCount.java: ## @@ -181,6 +182,11 @@ public Double getRowCount(Calc rel, RelMetadataQuery mq) {

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
YiwenWu commented on code in PR #3664: URL: https://github.com/apache/calcite/pull/3664#discussion_r1475566245 ## core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java: ## @@ -437,11 +437,43 @@ public Result visit(Filter e) { final Result x =

Re: [PR] [CALCITE-2067] RexLiteral cannot represent accurately floating point values, including NaN, Infinity [calcite]

2024-02-01 Thread via GitHub
mihaibudiu commented on code in PR #3663: URL: https://github.com/apache/calcite/pull/3663#discussion_r1475414494 ## core/src/main/java/org/apache/calcite/rex/RexLiteral.java: ## @@ -325,19 +324,18 @@ public static boolean valueMatchesType( } // fall through

Re: [PR] [CALCITE-2067] RexLiteral cannot represent accurately floating point values, including NaN, Infinity [calcite]

2024-02-01 Thread via GitHub
mihaibudiu commented on code in PR #3663: URL: https://github.com/apache/calcite/pull/3663#discussion_r1475414363 ## core/src/main/java/org/apache/calcite/rex/RexBuilder.java: ## @@ -1110,6 +1110,14 @@ public RexLiteral makeApproxLiteral(BigDecimal bd) { return

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
kramerul commented on code in PR #3664: URL: https://github.com/apache/calcite/pull/3664#discussion_r147280 ## core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java: ## @@ -437,11 +437,43 @@ public Result visit(Filter e) { final Result x =

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
YiwenWu commented on code in PR #3664: URL: https://github.com/apache/calcite/pull/3664#discussion_r1475566245 ## core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java: ## @@ -437,11 +437,43 @@ public Result visit(Filter e) { final Result x =

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
kramerul commented on PR #3664: URL: https://github.com/apache/calcite/pull/3664#issuecomment-1922916619 I'm not so deep into Calcite that I would be able to say if there are other cases. As far as I know, this is the only case because * columns are only renamed in the `Join` class *

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
kramerul commented on code in PR #3664: URL: https://github.com/apache/calcite/pull/3664#discussion_r1475583359 ## core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java: ## @@ -437,11 +437,43 @@ public Result visit(Filter e) { final Result x =

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
kramerul commented on code in PR #3664: URL: https://github.com/apache/calcite/pull/3664#discussion_r1475585120 ## core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java: ## @@ -437,11 +437,43 @@ public Result visit(Filter e) { final Result x =

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
sonarcloud[bot] commented on PR #3664: URL: https://github.com/apache/calcite/pull/3664#issuecomment-1923021602 ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate

Re: [PR] [CALCITE-6221] JDBC adapter generates invalid query when the same table is joined multiple times [calcite]

2024-02-01 Thread via GitHub
YiwenWu commented on code in PR #3664: URL: https://github.com/apache/calcite/pull/3664#discussion_r1475652612 ## core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java: ## @@ -437,11 +437,43 @@ public Result visit(Filter e) { final Result x =