Re: [PR] [CALCITE-5990] Explicit cast to numeric type doesn't check overflow [calcite]

2023-10-25 Thread via GitHub
rubenada commented on PR #3481: URL: https://github.com/apache/calcite/pull/3481#issuecomment-1778916330 @mihaibudiu do we need to update this PR to re-enable the test that was disabled on CALCITE-5921? -- This is an automated message from the Apache Git Service. To respond to the

Re: [PR] [CALCITE-5921] SqlOperatorFixture.checkFails and checkAggFails don't check runtime failure [calcite]

2023-10-25 Thread via GitHub
rubenada commented on PR #3471: URL: https://github.com/apache/calcite/pull/3471#issuecomment-177816 LGTM -- 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

Re: [PR] [CALCITE-5921] SqlOperatorFixture.checkFails and checkAggFails don't check runtime failure [calcite]

2023-10-25 Thread via GitHub
rubenada closed pull request #3412: [CALCITE-5921] SqlOperatorFixture.checkFails and checkAggFails don't check runtime failure URL: https://github.com/apache/calcite/pull/3412 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and

Re: [PR] [CALCITE-5921] SqlOperatorFixture.checkFails and checkAggFails don't check runtime failure [calcite]

2023-10-25 Thread via GitHub
rubenada commented on PR #3412: URL: https://github.com/apache/calcite/pull/3412#issuecomment-1778902006 Closing this one in favor of https://github.com/apache/calcite/pull/3471 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub

Re: [PR] [CALCITE-5990] Explicit cast to numeric type doesn't check overflow [calcite]

2023-10-28 Thread via GitHub
herunkang2018 commented on code in PR #3481: URL: https://github.com/apache/calcite/pull/3481#discussion_r1375219714 ## linq4j/src/main/java/org/apache/calcite/linq4j/tree/Primitive.java: ## @@ -367,28 +369,67 @@ public static List asList(double[] elements) { } /** -

Re: [PR] [CALCITE-5990] Explicit cast to numeric type doesn't check overflow [calcite]

2023-10-28 Thread via GitHub
herunkang2018 commented on PR #3481: URL: https://github.com/apache/calcite/pull/3481#issuecomment-1783767083 Thanks for the PR, I left some minor comments, other looks good. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub

Re: [PR] [CALCITE-5826] Add FIND_IN_SET function (enabled in Hive and Spark library) [calcite]

2023-10-28 Thread via GitHub
herunkang2018 commented on code in PR #3317: URL: https://github.com/apache/calcite/pull/3317#discussion_r1375230299 ## site/_docs/reference.md: ## @@ -2729,6 +2729,7 @@ BigQuery's type system uses confusingly different names for types and functions: | o | EXTRACT(xml, xpath,

Re: [PR] [CALCITE-5826] Add FIND_IN_SET function (enabled in Hive and Spark library) [calcite]

2023-10-28 Thread via GitHub
herunkang2018 commented on code in PR #3317: URL: https://github.com/apache/calcite/pull/3317#discussion_r1375230343 ## core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java: ## @@ -1076,6 +1076,32 @@ public static int levenshtein(String string1, String string2) {

Re: [PR] [CALCITE-6037] The function category of ARRAY/EXTRACT_VALUE/XML_TRANSFORM/EXTRACT_XML/EXISTSNODE is incorrect [calcite]

2023-10-28 Thread via GitHub
chucheng92 commented on PR #3458: URL: https://github.com/apache/calcite/pull/3458#issuecomment-1783777113 > For me, this is an improvement. > > If there is no objection, I will merge it. thanks for approve + 1. -- This is an automated message from the Apache Git Service. To

Re: [PR] [CALCITE-5826] Add FIND_IN_SET function (enabled in Hive and Spark library) [calcite]

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

Re: [PR] [CALCITE-129] Support recursive WITH queries [calcite]

2023-10-30 Thread via GitHub
asfgit closed pull request #3480: [CALCITE-129] Support recursive WITH queries URL: https://github.com/apache/calcite/pull/3480 -- 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.

Re: [PR] [CALCITE-6052] SqlImplementor writes REAL, FLOAT, and DOUBLE literals as DECIMAL literals [calcite]

2023-10-30 Thread via GitHub
asfgit closed pull request #3472: [CALCITE-6052] SqlImplementor writes REAL, FLOAT, and DOUBLE literals as DECIMAL literals URL: https://github.com/apache/calcite/pull/3472 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use

Re: [PR] [CALCITE-6035] Unparse 'WITHIN GROUP' for BigQuery dialect to match BigQuery documentation [calcite]

2023-10-18 Thread via GitHub
olivrlee commented on code in PR #3466: URL: https://github.com/apache/calcite/pull/3466#discussion_r1364690539 ## core/src/main/java/org/apache/calcite/sql/dialect/BigQuerySqlDialect.java: ## @@ -292,6 +295,17 @@ private static void unparseItem(SqlWriter writer, SqlCall call,

Re: [PR] [CALCITE-6035] Unparse 'WITHIN GROUP' for BigQuery dialect to match BigQuery documentation [calcite]

2023-10-18 Thread via GitHub
tanclary commented on code in PR #3466: URL: https://github.com/apache/calcite/pull/3466#discussion_r1364694015 ## core/src/main/java/org/apache/calcite/sql/dialect/BigQuerySqlDialect.java: ## @@ -292,6 +295,17 @@ private static void unparseItem(SqlWriter writer, SqlCall call,

Re: [PR] [CALCITE-6035] Unparse 'WITHIN GROUP' for BigQuery dialect to match BigQuery documentation [calcite]

2023-10-18 Thread via GitHub
olivrlee commented on code in PR #3466: URL: https://github.com/apache/calcite/pull/3466#discussion_r1364743179 ## core/src/main/java/org/apache/calcite/sql/dialect/BigQuerySqlDialect.java: ## @@ -292,6 +295,17 @@ private static void unparseItem(SqlWriter writer, SqlCall call,

Re: [PR] [CALCITE-6052] SqlImplementor writes REAL, FLOAT, and DOUBLE literals as DECIMAL literals [calcite]

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

Re: [PR] [CALCITE-6035] Unparse 'WITHIN GROUP' for BigQuery dialect to match BigQuery documentation [calcite]

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

Re: [PR] [CALCITE-5923] Some test cases in SqlOperatorTest violates the test fixture's design principle [calcite]

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

Re: [PR] [CALCITE-6022] Support "CREATE TABLE LIKE" DDL [calcite]

2023-10-18 Thread via GitHub
JiajunBernoulli merged PR #3442: URL: https://github.com/apache/calcite/pull/3442 -- 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:

Re: [PR] [CALCITE-5923] Some test cases in SqlOperatorTest violates the test fixture's design principle [calcite]

2023-10-17 Thread via GitHub
zabetak commented on code in PR #3364: URL: https://github.com/apache/calcite/pull/3364#discussion_r1362525701 ## core/src/main/java/org/apache/calcite/util/Bug.java: ## @@ -208,6 +208,12 @@ public abstract class Bug { * MILLISECOND and MICROSECOND units in INTERVAL literal

Re: [PR] [CALCITE-3933] Incorrect SQL Emitted for Unicode for Several Dialects [calcite]

2023-10-17 Thread via GitHub
mihaibudiu commented on code in PR #3474: URL: https://github.com/apache/calcite/pull/3474#discussion_r1362553094 ## core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java: ## @@ -7133,6 +7136,19 @@ private void checkLiteral2(String expression, String

[GitHub] [calcite] rubenada commented on pull request #3418: [CALCITE-5994] Add the optimize for removing the redundant order by when its source row number is less than or equal 1

2023-09-19 Thread via GitHub
rubenada commented on PR #3418: URL: https://github.com/apache/calcite/pull/3418#issuecomment-1725222676 Overall looks good @LakeShen , I left some minor comments. Also, I think the Jira/PR title (and hence the commit message and tests javadocs) could be improved (IMO it should mention

[GitHub] [calcite] rubenada commented on a diff in pull request #3418: [CALCITE-5994] Add the optimize for removing the redundant order by when its source row number is less than or equal 1

2023-09-19 Thread via GitHub
rubenada commented on code in PR #3418: URL: https://github.com/apache/calcite/pull/3418#discussion_r1329887547 ## core/src/main/java/org/apache/calcite/rel/rules/CoreRules.java: ## @@ -715,6 +715,11 @@ private CoreRules() {} public static final SortRemoveConstantKeysRule

[GitHub] [calcite] chunweilei commented on a diff in pull request #3404: [CALCITE-5968] Provide an interface for RexExecutable to decouple janino runtime binding

2023-09-18 Thread via GitHub
chunweilei commented on code in PR #3404: URL: https://github.com/apache/calcite/pull/3404#discussion_r1328415065 ## core/src/test/java/org/apache/calcite/rex/RexExecutorTest.java: ## @@ -378,4 +383,140 @@ public void run() { interface Action { void check(RexBuilder

[GitHub] [calcite] rubenada commented on a diff in pull request #3418: [CALCITE-5994] Add the optimize for removing the redundant order by when its source row number is less than or equal 1

2023-09-19 Thread via GitHub
rubenada commented on code in PR #3418: URL: https://github.com/apache/calcite/pull/3418#discussion_r1329887547 ## core/src/main/java/org/apache/calcite/rel/rules/CoreRules.java: ## @@ -715,6 +715,11 @@ private CoreRules() {} public static final SortRemoveConstantKeysRule

[GitHub] [calcite] rubenada commented on a diff in pull request #3418: [CALCITE-5994] Add the optimize for removing the redundant order by when its source row number is less than or equal 1

2023-09-19 Thread via GitHub
rubenada commented on code in PR #3418: URL: https://github.com/apache/calcite/pull/3418#discussion_r1329885385 ## core/src/main/java/org/apache/calcite/rel/rules/CoreRules.java: ## @@ -715,6 +715,11 @@ private CoreRules() {} public static final SortRemoveConstantKeysRule

[GitHub] [calcite] JiajunBernoulli commented on pull request #3423: [CALCITE-5997] OFFSET operator is incorrectly unparsed

2023-09-17 Thread via GitHub
JiajunBernoulli commented on PR #3423: URL: https://github.com/apache/calcite/pull/3423#issuecomment-1722669543 I think the current PR looks good. @tanclary, Do you have any suggestions? -- This is an automated message from the Apache Git Service. To respond to the message, please

[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-17 Thread via GitHub
jiefei30 commented on code in PR #3399: URL: https://github.com/apache/calcite/pull/3399#discussion_r1328200661 ## core/src/main/codegen/templates/Parser.jj: ## @@ -1988,8 +1988,8 @@ SqlLiteral JoinType() : } { ( -LOOKAHEAD(3) // required for "LEFT SEMI JOIN" in

[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 with the derived component typ

2023-09-19 Thread via GitHub
chucheng92 commented on code in PR #3395: URL: https://github.com/apache/calcite/pull/3395#discussion_r132782 ## core/src/test/resources/sql/misc.iq: ## @@ -2167,12 +2167,12 @@ select array[1,null,2] as a from (values (1)); values array['a',null,'bcd'], array['efgh'];

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3421: [CALCITE-5982] Allow overloading the created enumerable in CalciteMetaImpl when calling getTables() or getColumns()

2023-09-19 Thread via GitHub
sonarcloud[bot] commented on PR #3421: URL: https://github.com/apache/calcite/pull/3421#issuecomment-1726692918 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 commented on pull request #3421: [CALCITE-5982] Allow overloading the created enumerable in CalciteMetaImpl when calling getTables() or getColumns()

2023-09-19 Thread via GitHub
tanclary commented on PR #3421: URL: https://github.com/apache/calcite/pull/3421#issuecomment-1726617642 I think some of the code smells on this might be helpful suggestions. Like marking some of the variables as final or protected. Of course maybe they're irrelevant. -- This is an

[GitHub] [calcite] NobiGo merged pull request #3405: [CALCITE-5961] Type inference of ARRAY_COMPACT is incorrect

2023-09-19 Thread via GitHub
NobiGo merged PR #3405: URL: https://github.com/apache/calcite/pull/3405 -- 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] sonarcloud[bot] commented on pull request #3317: [CALCITE-5826] Add FIND_IN_SET function (enabled in Hive and Spark library)

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

[GitHub] [calcite] herunkang2018 commented on a diff in 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-19 Thread via GitHub
herunkang2018 commented on code in PR #3418: URL: https://github.com/apache/calcite/pull/3418#discussion_r1330831977 ## core/src/main/java/org/apache/calcite/rel/rules/SortRemoveRedundantRule.java: ## @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF)

[GitHub] [calcite] herunkang2018 commented on a diff in 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-19 Thread via GitHub
herunkang2018 commented on code in PR #3418: URL: https://github.com/apache/calcite/pull/3418#discussion_r1330838164 ## core/src/main/java/org/apache/calcite/rel/rules/SortRemoveRedundantRule.java: ## @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF)

[GitHub] [calcite] JiajunBernoulli merged pull request #3423: [CALCITE-5997] OFFSET operator is incorrectly unparsed

2023-09-19 Thread via GitHub
JiajunBernoulli merged PR #3423: URL: https://github.com/apache/calcite/pull/3423 -- 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] sonarcloud[bot] commented on pull request #3421: [CALCITE-5982] Allow overloading the created enumerable in CalciteMetaImpl when calling getTables() or getColumns()

2023-09-19 Thread via GitHub
sonarcloud[bot] commented on PR #3421: URL: https://github.com/apache/calcite/pull/3421#issuecomment-1726615819 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 #3317: [CALCITE-5826] Add FIND_IN_SET function (enabled in Hive and Spark library)

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

[GitHub] [calcite] herunkang2018 commented on a diff in pull request #3318: [CALCITE-5825] Add URL_ENCODE and URL_DECODE function (enabled in Spark library)

2023-09-22 Thread via GitHub
herunkang2018 commented on code in PR #3318: URL: https://github.com/apache/calcite/pull/3318#discussion_r1334902316 ## core/src/main/java/org/apache/calcite/runtime/UrlFunctions.java: ## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or

[GitHub] [calcite] herunkang2018 commented on a diff in pull request #3318: [CALCITE-5825] Add URL_ENCODE and URL_DECODE function (enabled in Spark library)

2023-09-22 Thread via GitHub
herunkang2018 commented on code in PR #3318: URL: https://github.com/apache/calcite/pull/3318#discussion_r1334902316 ## core/src/main/java/org/apache/calcite/runtime/UrlFunctions.java: ## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or

[GitHub] [calcite] LakeShen commented on a diff in pull request #3436: [CALCITE-5984] Allow disabling field trim via `SqlToRelConverter` config

2023-09-22 Thread via GitHub
LakeShen commented on code in PR #3436: URL: https://github.com/apache/calcite/pull/3436#discussion_r1334906829 ## core/src/test/java/org/apache/calcite/test/JdbcTest.java: ## @@ -8247,6 +8343,33 @@ private static String sums(int n, boolean c) { return b.toString(); }

[GitHub] [calcite] herunkang2018 commented on a diff in pull request #3318: [CALCITE-5825] Add URL_ENCODE and URL_DECODE function (enabled in Spark library)

2023-09-22 Thread via GitHub
herunkang2018 commented on code in PR #3318: URL: https://github.com/apache/calcite/pull/3318#discussion_r1334901753 ## core/src/main/java/org/apache/calcite/runtime/UrlFunctions.java: ## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or

[GitHub] [calcite] herunkang2018 commented on a diff in pull request #3318: [CALCITE-5825] Add URL_ENCODE and URL_DECODE function (enabled in Spark library)

2023-09-22 Thread via GitHub
herunkang2018 commented on code in PR #3318: URL: https://github.com/apache/calcite/pull/3318#discussion_r1334893854 ## core/src/main/java/org/apache/calcite/runtime/UrlFunctions.java: ## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or

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

2023-09-22 Thread via GitHub
LakeShen commented on PR #3436: URL: https://github.com/apache/calcite/pull/3436#issuecomment-1732185150 @WegdanGhazi thank you for opening this PR, left a couple of comments! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3420: [CALCITE-5989] Type inference for RPAD and LPAD functions (BIGQUERY) is incorrect

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

[GitHub] [calcite] LakeShen commented on a diff in pull request #3436: [CALCITE-5984] Allow disabling field trim via `SqlToRelConverter` config

2023-09-22 Thread via GitHub
LakeShen commented on code in PR #3436: URL: https://github.com/apache/calcite/pull/3436#discussion_r1334906120 ## core/src/test/java/org/apache/calcite/test/JdbcTest.java: ## @@ -3119,6 +3125,96 @@ void testInnerJoinValues(String format) { "deptno=10; name=Sales;

[GitHub] [calcite] herunkang2018 commented on a diff in pull request #3318: [CALCITE-5825] Add URL_ENCODE and URL_DECODE function (enabled in Spark library)

2023-09-22 Thread via GitHub
herunkang2018 commented on code in PR #3318: URL: https://github.com/apache/calcite/pull/3318#discussion_r1334901753 ## core/src/main/java/org/apache/calcite/runtime/UrlFunctions.java: ## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or

[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] 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

[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] 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] 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] 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] 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

[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,

[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] 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] herunkang2018 commented on a diff in pull request #3318: [CALCITE-5825] Add URL_ENCODE and URL_DECODE function (enabled in Spark library)

2023-09-22 Thread via GitHub
herunkang2018 commented on code in PR #3318: URL: https://github.com/apache/calcite/pull/3318#discussion_r1334891290 ## core/src/main/java/org/apache/calcite/runtime/UrlFunctions.java: ## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or

[GitHub] [calcite] JiajunBernoulli commented on a diff in pull request #3429: [CALCITE-6006] RelToSqlConverter loses charset information

2023-09-23 Thread via GitHub
JiajunBernoulli commented on code in PR #3429: URL: https://github.com/apache/calcite/pull/3429#discussion_r1334934887 ## core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java: ## @@ -268,6 +268,14 @@ private static String toSql(RelNode root, SqlDialect

[GitHub] [calcite] JiajunBernoulli commented on a diff in pull request #3429: [CALCITE-6006] RelToSqlConverter loses charset information

2023-09-23 Thread via GitHub
JiajunBernoulli commented on code in PR #3429: URL: https://github.com/apache/calcite/pull/3429#discussion_r1334934806 ## core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java: ## @@ -1409,8 +1411,20 @@ public static SqlNode toSql(RexLiteral literal) {

[GitHub] [calcite] JiajunBernoulli commented on a diff in pull request #3431: [CALCITE-5523] RelToSql converter generates GROUP BY clause with wind…

2023-09-23 Thread via GitHub
JiajunBernoulli commented on code in PR #3431: URL: https://github.com/apache/calcite/pull/3431#discussion_r1334939074 ## core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java: ## @@ -1878,6 +1878,11 @@ && hasSortByOrdinal()) { && (hasNestedAgg ||

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

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

[GitHub] [calcite] LakeShen commented on a diff in pull request #3379: [CALCITE-5927] LoptOptimizeJoinRule miss removable self-join when col…

2023-09-22 Thread via GitHub
LakeShen commented on code in PR #3379: URL: https://github.com/apache/calcite/pull/3379#discussion_r1334914732 ## core/src/test/java/org/apache/calcite/tools/PlannerTest.java: ## @@ -1576,4 +1583,77 @@ private static class VaryingTypeSystem extends DelegatingTypeSystem {

[GitHub] [calcite] LakeShen commented on a diff in pull request #3379: [CALCITE-5927] LoptOptimizeJoinRule miss removable self-join when col…

2023-09-22 Thread via GitHub
LakeShen commented on code in PR #3379: URL: https://github.com/apache/calcite/pull/3379#discussion_r1334914637 ## core/src/test/java/org/apache/calcite/tools/PlannerTest.java: ## @@ -1576,4 +1583,77 @@ private static class VaryingTypeSystem extends DelegatingTypeSystem {

[GitHub] [calcite] wq352400523 commented on a diff in pull request #3379: [CALCITE-5927] LoptOptimizeJoinRule miss removable self-join when col…

2023-09-22 Thread via GitHub
wq352400523 commented on code in PR #3379: URL: https://github.com/apache/calcite/pull/3379#discussion_r1334921996 ## core/src/test/java/org/apache/calcite/tools/PlannerTest.java: ## @@ -1576,4 +1583,77 @@ private static class VaryingTypeSystem extends DelegatingTypeSystem {

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3440: [CALCITE-6007] CTE as subquery without alias doesn't have correct alias setup

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

[GitHub] [calcite] JiajunBernoulli commented on a diff in pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-23 Thread via GitHub
JiajunBernoulli commented on code in PR #3396: URL: https://github.com/apache/calcite/pull/3396#discussion_r1334935445 ## core/src/main/java/org/apache/calcite/rel/rules/SortMergeRule.java: ## @@ -0,0 +1,145 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one

[GitHub] [calcite] LakeShen commented on a diff in pull request #3379: [CALCITE-5927] LoptOptimizeJoinRule miss removable self-join when col…

2023-09-22 Thread via GitHub
LakeShen commented on code in PR #3379: URL: https://github.com/apache/calcite/pull/3379#discussion_r1334909352 ## core/src/main/java/org/apache/calcite/rel/rules/LoptOptimizeJoinRule.java: ## @@ -2071,12 +2071,12 @@ private static boolean

[GitHub] [calcite] wq352400523 commented on a diff in pull request #3379: [CALCITE-5927] LoptOptimizeJoinRule miss removable self-join when col…

2023-09-22 Thread via GitHub
wq352400523 commented on code in PR #3379: URL: https://github.com/apache/calcite/pull/3379#discussion_r1334922102 ## core/src/test/java/org/apache/calcite/tools/PlannerTest.java: ## @@ -1576,4 +1583,77 @@ private static class VaryingTypeSystem extends DelegatingTypeSystem {

[GitHub] [calcite] wq352400523 commented on a diff in pull request #3379: [CALCITE-5927] LoptOptimizeJoinRule miss removable self-join when col…

2023-09-22 Thread via GitHub
wq352400523 commented on code in PR #3379: URL: https://github.com/apache/calcite/pull/3379#discussion_r1334922101 ## core/src/test/java/org/apache/calcite/tools/PlannerTest.java: ## @@ -1576,4 +1583,77 @@ private static class VaryingTypeSystem extends DelegatingTypeSystem {

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3440: [CALCITE-6007] CTE as subquery without alias doesn't have correct alias setup

2023-09-23 Thread via GitHub
sonarcloud[bot] commented on PR #3440: URL: https://github.com/apache/calcite/pull/3440#issuecomment-1732227674 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 #3326: CALCITE-5860 Set scale when casting Decimal

2023-09-24 Thread via GitHub
sonarcloud[bot] commented on PR #3326: URL: https://github.com/apache/calcite/pull/3326#issuecomment-1732504807 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 #3396: [CALCITE-5940] Add the Rules to optimize Limit

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

[GitHub] [calcite] LakeShen commented on pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-24 Thread via GitHub
LakeShen commented on PR #3396: URL: https://github.com/apache/calcite/pull/3396#issuecomment-1732532967 Hi @JiajunBernoulli , Thank you for your review suggestions. I have modified according to the suggestions. If you have time, please help me review or merge it again. Thanks

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

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

[GitHub] [calcite] JiajunBernoulli commented on a diff in pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-23 Thread via GitHub
JiajunBernoulli commented on code in PR #3396: URL: https://github.com/apache/calcite/pull/3396#discussion_r1335108097 ## core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java: ## @@ -1254,6 +1254,30 @@ private void checkSemiOrAntiJoinProjectTranspose(JoinRelType

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3326: CALCITE-5860 Set scale when casting Decimal

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

[GitHub] [calcite] LakeShen commented on a diff in pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-24 Thread via GitHub
LakeShen commented on code in PR #3396: URL: https://github.com/apache/calcite/pull/3396#discussion_r1335153441 ## core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java: ## @@ -1254,6 +1254,30 @@ private void checkSemiOrAntiJoinProjectTranspose(JoinRelType type) {

[GitHub] [calcite] JiajunBernoulli commented on a diff in pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-23 Thread via GitHub
JiajunBernoulli commented on code in PR #3396: URL: https://github.com/apache/calcite/pull/3396#discussion_r1335105756 ## core/src/main/java/org/apache/calcite/rel/rules/SortMergeRule.java: ## @@ -0,0 +1,139 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one

[GitHub] [calcite] JiajunBernoulli commented on a diff in pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-23 Thread via GitHub
JiajunBernoulli commented on code in PR #3396: URL: https://github.com/apache/calcite/pull/3396#discussion_r1335105720 ## core/src/main/java/org/apache/calcite/rel/rules/SortMergeRule.java: ## @@ -0,0 +1,139 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one

[GitHub] [calcite] LakeShen commented on a diff in pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-23 Thread via GitHub
LakeShen commented on code in PR #3396: URL: https://github.com/apache/calcite/pull/3396#discussion_r1335104439 ## core/src/main/java/org/apache/calcite/rel/rules/SortMergeRule.java: ## @@ -0,0 +1,145 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more

[GitHub] [calcite] LakeShen commented on pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-23 Thread via GitHub
LakeShen commented on PR #3396: URL: https://github.com/apache/calcite/pull/3396#issuecomment-1732477741 Hi @JiajunBernoulli , Thank you for your review suggestions. I have modified according to the suggestions. If you have time, please help me review or merge it. -- This is an

[GitHub] [calcite] JiajunBernoulli commented on a diff in pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-23 Thread via GitHub
JiajunBernoulli commented on code in PR #3396: URL: https://github.com/apache/calcite/pull/3396#discussion_r1335106001 ## core/src/main/java/org/apache/calcite/rel/rules/SortMergeRule.java: ## @@ -0,0 +1,139 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

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

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

2023-09-24 Thread via GitHub
JiajunBernoulli commented on code in PR #3399: URL: https://github.com/apache/calcite/pull/3399#discussion_r1335131046 ## babel/src/main/codegen/config.fmpp: ## @@ -62,7 +63,8 @@ data: { "SEED" "SEMI" "SEQUENCES" - "TEMP" + "TEMP", Review

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

2023-09-24 Thread via GitHub
JiajunBernoulli commented on code in PR #3399: URL: https://github.com/apache/calcite/pull/3399#discussion_r1335130964 ## babel/src/test/java/org/apache/calcite/test/BabelParserTest.java: ## @@ -430,6 +431,23 @@ private void checkParseInfixCast(String sqlType) {

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

2023-09-24 Thread via GitHub
JiajunBernoulli commented on code in PR #3399: URL: https://github.com/apache/calcite/pull/3399#discussion_r1335131033 ## babel/src/main/codegen/config.fmpp: ## @@ -49,7 +49,8 @@ data: { "SEMI" "SEQUENCES" "TEMP" - "VOLATILE" + "VOLATILE", +

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3396: [CALCITE-5940] Add the Rules to optimize Limit

2023-09-24 Thread via GitHub
sonarcloud[bot] commented on PR #3396: URL: https://github.com/apache/calcite/pull/3396#issuecomment-1732536584 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 #3439: [CALCITE-6011] Add the RelRule that pushes the Filter past a Window

2023-09-22 Thread via GitHub
sonarcloud[bot] commented on PR #3439: URL: https://github.com/apache/calcite/pull/3439#issuecomment-1731778058 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] Use explicit casting if element type in ARRAY/MAP does not equal derived component type

2023-09-22 Thread via GitHub
chucheng92 commented on code in PR #3395: URL: https://github.com/apache/calcite/pull/3395#discussion_r1334163792 ## core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java: ## @@ -1309,6 +1311,63 @@ public static boolean isMeasure(SqlNode selectItem) {

[GitHub] [calcite] chucheng92 commented on a diff in pull request #3395: [CALCITE-5948] Use explicit casting if element type in ARRAY/MAP does not equal derived component type

2023-09-22 Thread via GitHub
chucheng92 commented on code in PR #3395: URL: https://github.com/apache/calcite/pull/3395#discussion_r1334163600 ## core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java: ## @@ -1309,6 +1311,63 @@ public static boolean isMeasure(SqlNode selectItem) {

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3416: [CALCITE-4189] Simplify 'p OR (p IS NOT TRUE)' to 'TRUE'

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

[GitHub] [calcite] LakeShen commented on a diff in pull request #3436: [CALCITE-5984] Allow disabling field trim via `SqlToRelConverter` config

2023-09-22 Thread via GitHub
LakeShen commented on code in PR #3436: URL: https://github.com/apache/calcite/pull/3436#discussion_r1334200557 ## core/src/main/java/org/apache/calcite/prepare/Prepare.java: ## @@ -293,10 +293,12 @@ public PreparedResult prepareSql( root =

[GitHub] [calcite] chucheng92 commented on pull request #3395: [CALCITE-5948] Use explicit casting if element type in ARRAY/MAP does not equal derived component type

2023-09-22 Thread via GitHub
chucheng92 commented on PR #3395: URL: https://github.com/apache/calcite/pull/3395#issuecomment-1731153978 hi, @tanclary I have added javadoc in these private methods with a single commit, If you have time, PTAL again. thanks and sorry to bother you. -- This is an automated

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3395: [CALCITE-5948] Use explicit casting if element type in ARRAY/MAP does not equal derived component type

2023-09-22 Thread via GitHub
sonarcloud[bot] commented on PR #3395: URL: https://github.com/apache/calcite/pull/3395#issuecomment-1731164737 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 #3395: [CALCITE-5948] Use explicit casting if element type in ARRAY/MAP does not equal derived component type

2023-09-22 Thread via GitHub
sonarcloud[bot] commented on PR #3395: URL: https://github.com/apache/calcite/pull/3395#issuecomment-1731195782 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 #3417: [CALCITE-5993] Add CODE_POINTS_TO_STRING, TO_CODE_POINTS function (en…

2023-09-22 Thread via GitHub
sonarcloud[bot] commented on PR #3417: URL: https://github.com/apache/calcite/pull/3417#issuecomment-1731168067 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] Use explicit casting if element type in ARRAY/MAP does not equal derived component type

2023-09-22 Thread via GitHub
chucheng92 commented on code in PR #3395: URL: https://github.com/apache/calcite/pull/3395#discussion_r1334161198 ## babel/src/test/resources/sql/big-query.iq: ## @@ -1012,9 +1012,9 @@ FROM SELECT Review Comment: thanks, both updated the Jira and commit name to this.

<    5   6   7   8   9   10   11   12   13   14   >