[GitHub] [calcite] sonarcloud[bot] commented on pull request #3379: [CALCITE-5927] LoptOptimizeJoinRule miss removable self-join when col…

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3379: URL: https://github.com/apache/calcite/pull/3379#issuecomment-1730722563 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3437: [CALCITE-6020] SqlToRelConverter should not replace windowed SUM with…

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3437: URL: https://github.com/apache/calcite/pull/3437#issuecomment-1730097987 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3438: [CALCITE-5955] BigQuery PERCENTILE functions are unparsed incorrectly

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3438: URL: https://github.com/apache/calcite/pull/3438#issuecomment-1730032302 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3438: [CALCITE-5955] BigQuery PERCENTILE functions are unparsed incorrectly

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3438: URL: https://github.com/apache/calcite/pull/3438#issuecomment-1730006247 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] mihaibudiu commented on a diff in pull request #3430: [CALCITE-6008] ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-21 Thread via GitHub
mihaibudiu commented on code in PR #3430: URL: https://github.com/apache/calcite/pull/3430#discussion_r183870 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -9314,11 +9314,12 @@ private static void checkGroupConcatFuncFails(SqlOperatorFixture

[GitHub] [calcite] mihaibudiu commented on a diff in pull request #3430: [CALCITE-6008] ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-21 Thread via GitHub
mihaibudiu commented on code in PR #3430: URL: https://github.com/apache/calcite/pull/3430#discussion_r181033 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -9314,11 +9314,12 @@ private static void checkGroupConcatFuncFails(SqlOperatorFixture

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3430: [CALCITE-6008] ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3430: URL: https://github.com/apache/calcite/pull/3430#issuecomment-1729978127 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] tanclary opened a new pull request, #3438: [CALCITE-5955] BigQuery PERCENTILE functions are unparsed incorrectly

2023-09-21 Thread via GitHub
tanclary opened a new pull request, #3438: URL: https://github.com/apache/calcite/pull/3438 The main solution I used for the problem I describe in the JIRA case is adding an override to `SqlBasicAggFunction` for `allowsFraming()`, this should be `FALSE` for BigQuery's percentile functions

[GitHub] [calcite] Jiabao-Sun commented on pull request #3430: [CALCITE-6008] ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-21 Thread via GitHub
Jiabao-Sun commented on PR #3430: URL: https://github.com/apache/calcite/pull/3430#issuecomment-1729945707 Many thanks to @tanclary, please help review it again when you have time. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3430: [CALCITE-6008] ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3430: URL: https://github.com/apache/calcite/pull/3430#issuecomment-1729925930 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] Jiabao-Sun commented on a diff in pull request #3430: [CALCITE-6008] ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-21 Thread via GitHub
Jiabao-Sun commented on code in PR #3430: URL: https://github.com/apache/calcite/pull/3430#discussion_r119224 ## core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java: ## @@ -645,6 +645,13 @@ public static SqlCall stripSeparator(SqlCall call) { public static

[GitHub] [calcite] tanclary commented on a diff in pull request #3395: [CALCITE-5948] Explicit casting should be made if the type of an element in ARRAY/MAP not equals the derived component type

2023-09-21 Thread via GitHub
tanclary commented on code in PR #3395: URL: https://github.com/apache/calcite/pull/3395#discussion_r1333269098 ## babel/src/test/resources/sql/big-query.iq: ## @@ -1012,9 +1012,9 @@ FROM SELECT Review Comment: Nit: could we change the commit message to "Use explicit

[GitHub] [calcite] tanclary commented on a diff in pull request #3417: [CALCITE-5993] Add CODE_POINTS_TO_STRING, TO_CODE_POINTS function (en…

2023-09-21 Thread via GitHub
tanclary commented on code in PR #3417: URL: https://github.com/apache/calcite/pull/3417#discussion_r1333242359 ## babel/src/test/resources/sql/big-query.iq: ## @@ -2029,6 +2029,160 @@ SELECT CODE_POINTS_TO_BYTES(array[2147483648, 1]); Input arguments of CODE_POINTS_TO_BYTES

[GitHub] [calcite] chucheng92 commented on pull request #3395: [CALCITE-5948] Explicit casting should be made if the type of an element in ARRAY/MAP not equals the derived component type

2023-09-21 Thread via GitHub
chucheng92 commented on PR #3395: URL: https://github.com/apache/calcite/pull/3395#issuecomment-1729817048 thanks Julian and Vladimir for reviewing the related commit calcite-5960. Considering that commit has been resolved, so I have rebased this PR. Currently all comments are

[GitHub] [calcite] tanclary commented on a diff in pull request #3430: [CALCITE-6008] ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-21 Thread via GitHub
tanclary commented on code in PR #3430: URL: https://github.com/apache/calcite/pull/3430#discussion_r1333231129 ## core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java: ## @@ -645,6 +645,13 @@ public static SqlCall stripSeparator(SqlCall call) { public static

[GitHub] [calcite] tanclary commented on a diff in pull request #3430: [CALCITE-6008] ARRAY_AGG should returns ARRAY NULL when there's no input rows

2023-09-21 Thread via GitHub
tanclary commented on code in PR #3430: URL: https://github.com/apache/calcite/pull/3430#discussion_r1333226171 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -9314,11 +9314,12 @@ private static void checkGroupConcatFuncFails(SqlOperatorFixture t)

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3436: [CALCITE-5984] Allow disabling field trim via `SqlToRelConverter` config

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3436: URL: https://github.com/apache/calcite/pull/3436#issuecomment-1729716547 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3437: [CALCITE-6020] SqlToRelConverter should not replace windowed SUM with…

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3437: URL: https://github.com/apache/calcite/pull/3437#issuecomment-1729694533 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] WegdanGhazi opened a new pull request, #3436: [CALCITE-5984] Allow disabling field trim via `SqlToRelConverter` config

2023-09-21 Thread via GitHub
WegdanGhazi opened a new pull request, #3436: URL: https://github.com/apache/calcite/pull/3436 [CALCITE-5984](https://issues.apache.org/jira/browse/CALCITE-5984) Allow disabling field trim via `SqlToRelConverter` config Use the value of `isTrimUnusedFields` set to

[GitHub] [calcite] pfzhan commented on a diff in pull request #3326: CALCITE-5860 Set scale when casting Decimal

2023-09-21 Thread via GitHub
pfzhan commented on code in PR #3326: URL: https://github.com/apache/calcite/pull/3326#discussion_r1332953600 ## testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java: ## @@ -6422,6 +6422,10 @@ private static void checkIf(SqlOperatorFixture f) {

[GitHub] [calcite] jiefei30 commented on a diff in pull request #3399: [CALCITE-5962] Support parse Spark-style syntax LEFT ANTI JOIN in Babel parser

2023-09-21 Thread via GitHub
jiefei30 commented on code in PR #3399: URL: https://github.com/apache/calcite/pull/3399#discussion_r1332803836 ## core/src/main/codegen/templates/Parser.jj: ## @@ -1988,8 +1988,8 @@ SqlLiteral JoinType() : } { ( -LOOKAHEAD(3) // required for "LEFT SEMI JOIN" in

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3395: [CALCITE-5948] Explicit casting should be made if the type of an element in ARRAY/MAP not equals the derived component type

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3395: URL: https://github.com/apache/calcite/pull/3395#issuecomment-1729155890 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] asfgit closed pull request #3406: [CALCITE-5974] Elasticsearch adapter throws ClassCastException when index mapping sets dynamic_templates without properties

2023-09-21 Thread via GitHub
asfgit closed pull request #3406: [CALCITE-5974] Elasticsearch adapter throws ClassCastException when index mapping sets dynamic_templates without properties URL: https://github.com/apache/calcite/pull/3406 -- This is an automated message from the Apache Git Service. To respond to the

[calcite] branch main updated: [CALCITE-5974] Elasticsearch adapter throws ClassCastException when index mapping sets `dynamic_templates` without `properties`

2023-09-21 Thread jhyde
This is an automated email from the ASF dual-hosted git repository. jhyde pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/calcite.git The following commit(s) were added to refs/heads/main by this push: new e1991e08a2 [CALCITE-5974] Elasticsearch adapter

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3362: (do not check in)

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3362: URL: https://github.com/apache/calcite/pull/3362#issuecomment-1729145371 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] chucheng92 commented on a diff in pull request #3395: [CALCITE-5948] Explicit casting should be made if the type of an element in ARRAY/MAP not equals the derived component type

2023-09-21 Thread via GitHub
chucheng92 commented on code in PR #3395: URL: https://github.com/apache/calcite/pull/3395#discussion_r1332706699 ## core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java: ## @@ -973,6 +973,9 @@ private static Expression scaleIntervalToNumber(

[GitHub] [calcite] chucheng92 commented on pull request #3395: [CALCITE-5948] Explicit casting should be made if the type of an element in ARRAY/MAP not equals the derived component type

2023-09-21 Thread via GitHub
chucheng92 commented on PR #3395: URL: https://github.com/apache/calcite/pull/3395#issuecomment-1729133495 > @julianhyde hi, julian. I noticed that you gave a comment in the ticket to suggest giving a test case for [calcite-5960](https://issues.apache.org/jira/browse/CALCITE-5960). I have

[GitHub] [calcite] chucheng92 commented on a diff in pull request #3395: [CALCITE-5948] Explicit casting should be made if the type of an element in ARRAY/MAP not equals the derived component type

2023-09-21 Thread via GitHub
chucheng92 commented on code in PR #3395: URL: https://github.com/apache/calcite/pull/3395#discussion_r1332706699 ## core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java: ## @@ -973,6 +973,9 @@ private static Expression scaleIntervalToNumber(

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3362: (do not check in)

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3362: URL: https://github.com/apache/calcite/pull/3362#issuecomment-1729075499 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] asfgit closed pull request #3432: [CALCITE-5995] add cache to dejsonize function in JsonFunctions

2023-09-21 Thread via GitHub
asfgit closed pull request #3432: [CALCITE-5995] add cache to dejsonize function in JsonFunctions URL: https://github.com/apache/calcite/pull/3432 -- 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

[calcite] 01/02: [CALCITE-5960] CAST throws NullPointerException if SqlTypeFamily of targetType is null

2023-09-21 Thread jhyde
This is an automated email from the ASF dual-hosted git repository. jhyde pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/calcite.git commit 3775307e0b490f1bdad1555809d6bace073c2547 Author: Ran Tao AuthorDate: Sun Aug 27 14:33:36 2023 +0800 [CALCITE-5960]

[calcite] branch main updated (1775baf218 -> 1cc1eb3a47)

2023-09-21 Thread jhyde
This is an automated email from the ASF dual-hosted git repository. jhyde pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/calcite.git from 1775baf218 [CALCITE-5994] Add optimization rule to remove Sort when its input's row number is less or equal to one

[calcite] 02/02: [CALCITE-5995] JSON_VALUE, JSON_EXISTS, JSON_QUERY functions should cache generated objects between calls

2023-09-21 Thread jhyde
This is an automated email from the ASF dual-hosted git repository. jhyde pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/calcite.git commit 1cc1eb3a477ce7687436024b4760cf1f04a80cbc Author: xiaogang AuthorDate: Tue Sep 19 16:27:15 2023 +0800 [CALCITE-5995]

[GitHub] [calcite] chucheng92 commented on a diff in pull request #3395: [CALCITE-5948] Explicit casting should be made if the type of an element in ARRAY/MAP not equals the derived component type

2023-09-21 Thread via GitHub
chucheng92 commented on code in PR #3395: URL: https://github.com/apache/calcite/pull/3395#discussion_r1332630820 ## core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java: ## @@ -973,6 +973,9 @@ private static Expression scaleIntervalToNumber(

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3395: [CALCITE-5948] Explicit casting should be made if the type of an element in ARRAY/MAP not equals the derived component type

2023-09-21 Thread via GitHub
sonarcloud[bot] commented on PR #3395: URL: https://github.com/apache/calcite/pull/3395#issuecomment-1729031291 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png

[GitHub] [calcite] rubenada commented on a diff in pull request #3420: [CALCITE-5989] [jira] Type inference for RPAD and LPAD functions (BIGQUERY) is incorrect

2023-09-21 Thread via GitHub
rubenada commented on code in PR #3420: URL: https://github.com/apache/calcite/pull/3420#discussion_r1332613041 ## core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java: ## @@ -280,7 +280,11 @@ private static SqlCall transformConvert(SqlValidator validator,

[calcite] branch main updated: [CALCITE-5994] Add optimization rule to remove Sort when its input's row number is less or equal to one

2023-09-21 Thread rubenql
This is an automated email from the ASF dual-hosted git repository. rubenql pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/calcite.git The following commit(s) were added to refs/heads/main by this push: new 1775baf218 [CALCITE-5994] Add optimization rule

[GitHub] [calcite] rubenada merged pull request #3418: [CALCITE-5994] Add optimization rule to remove Sort when its input's row number is less or equal to one

2023-09-21 Thread via GitHub
rubenada merged PR #3418: URL: https://github.com/apache/calcite/pull/3418 -- 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, e-mail:

[GitHub] [calcite] vlsi commented on a diff in pull request #3395: [CALCITE-5948] Explicit casting should be made if the type of an element in ARRAY/MAP not equals the derived component type

2023-09-21 Thread via GitHub
vlsi commented on code in PR #3395: URL: https://github.com/apache/calcite/pull/3395#discussion_r1332562309 ## core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java: ## @@ -973,6 +973,9 @@ private static Expression scaleIntervalToNumber(