[GitHub] [calcite] ViggoC commented on a diff in pull request #3311: [CALCITE-5732] EnumerableHashJoin and EnumerableMergeJoin on composite key return rows matching condition 'null = null'

2023-07-12 Thread via GitHub


ViggoC commented on code in PR #3311:
URL: https://github.com/apache/calcite/pull/3311#discussion_r1262012604


##
core/src/test/java/org/apache/calcite/test/enumerable/EnumerableHashJoinTest.java:
##
@@ -74,6 +74,25 @@ class EnumerableHashJoinTest {
 "empid=110; name=Theodore; dept=Sales");
   }
 
+  @Test void innerJoinWithCompositeKeyAndNullValues() {
+tester(false, new HrSchema())
+.query(
+"select e1.empid from emps e1 join emps e2 "
++ "on e1.deptno=e2.deptno and e1.commission=e2.commission")
+.withHook(Hook.PLANNER, (Consumer) planner ->
+planner.removeRule(EnumerableRules.ENUMERABLE_MERGE_JOIN_RULE))
+.explainContains("EnumerableCalc(expr#0..4=[{inputs}], empid=[$t0])\n"
++ "  EnumerableHashJoin(condition=[AND(=($1, $3), =($2, $4))], 
joinType=[inner])\n"

Review Comment:
   Do we need test cases for outer join with composite keys?



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] chucheng92 commented on a diff in pull request #3313: [CALCITE-5841] Improve the logic of creating JDBCMeta singleton in calcite plus

2023-07-12 Thread via GitHub


chucheng92 commented on code in PR #3313:
URL: https://github.com/apache/calcite/pull/3313#discussion_r1261981582


##
plus/src/main/java/org/apache/calcite/chinook/ChinookAvaticaServer.java:
##
@@ -62,16 +62,18 @@ public static class CalciteChinookMetaFactory implements 
Meta.Factory {
 private static final CalciteConnectionProvider CONNECTION_PROVIDER =
 new CalciteConnectionProvider();
 
-private static JdbcMeta instance = null;
+private static volatile JdbcMeta instance = null;
 
 private static JdbcMeta getInstance() {
   if (instance == null) {
-try {
-  instance =
-  new JdbcMeta(CalciteConnectionProvider.DRIVER_URL,
-  CONNECTION_PROVIDER.provideConnectionInfo());
-} catch (SQLException | IOException e) {
-  throw new RuntimeException(e);
+synchronized (JdbcMeta.class) {

Review Comment:
   @chucheng92 hi, benchao. thanks for reviewing. updated.



##
plus/src/main/java/org/apache/calcite/chinook/ChinookAvaticaServer.java:
##
@@ -62,16 +62,18 @@ public static class CalciteChinookMetaFactory implements 
Meta.Factory {
 private static final CalciteConnectionProvider CONNECTION_PROVIDER =
 new CalciteConnectionProvider();
 
-private static JdbcMeta instance = null;
+private static volatile JdbcMeta instance = null;
 
 private static JdbcMeta getInstance() {
   if (instance == null) {
-try {
-  instance =
-  new JdbcMeta(CalciteConnectionProvider.DRIVER_URL,
-  CONNECTION_PROVIDER.provideConnectionInfo());
-} catch (SQLException | IOException e) {
-  throw new RuntimeException(e);
+synchronized (JdbcMeta.class) {

Review Comment:
   @libenchao hi, benchao. thanks for reviewing. updated.



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] libenchao commented on a diff in pull request #3313: [CALCITE-5841] Improve the logic of creating JDBCMeta singleton in calcite plus

2023-07-12 Thread via GitHub


libenchao commented on code in PR #3313:
URL: https://github.com/apache/calcite/pull/3313#discussion_r1261916888


##
plus/src/main/java/org/apache/calcite/chinook/ChinookAvaticaServer.java:
##
@@ -62,16 +62,18 @@ public static class CalciteChinookMetaFactory implements 
Meta.Factory {
 private static final CalciteConnectionProvider CONNECTION_PROVIDER =
 new CalciteConnectionProvider();
 
-private static JdbcMeta instance = null;
+private static volatile JdbcMeta instance = null;
 
 private static JdbcMeta getInstance() {
   if (instance == null) {
-try {
-  instance =
-  new JdbcMeta(CalciteConnectionProvider.DRIVER_URL,
-  CONNECTION_PROVIDER.provideConnectionInfo());
-} catch (SQLException | IOException e) {
-  throw new RuntimeException(e);
+synchronized (JdbcMeta.class) {

Review Comment:
   How about just synchronizing on `CalciteChinookMetaFactory.class`? (Same to 
`RawChinookMetaFactory`)



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3308: Style:fix misleading naming while build SqlType mapping rule

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3308:
URL: https://github.com/apache/calcite/pull/3308#issuecomment-1633460279

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3308)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3308=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3308=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3308=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3308=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3308=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3308=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3308=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3308=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3308=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3308=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3308=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3308=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3308=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3308=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3308=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3308=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] ForestLH commented on pull request #3308: Style:fix misleading naming while build SqlType mapping rule

2023-07-12 Thread via GitHub


ForestLH commented on PR #3308:
URL: https://github.com/apache/calcite/pull/3308#issuecomment-1633439794

   > I think you're right. So I am +1 for this change. But the commit message 
should be more clear.
   
   Thank you reply   :)


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3314: [CALCITE-5843] Prevent parse error during evaluation of constant expressions in linq4j

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3314:
URL: https://github.com/apache/calcite/pull/3314#issuecomment-1633432135

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3314)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3314=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3314=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3314=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=CODE_SMELL)
   
   
[![84.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'84.8%')](https://sonarcloud.io/component_measures?id=apache_calcite=3314=new_coverage=list)
 [84.8% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3314=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3314=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3314=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3314: [CALCITE-5843] Prevent parse error during evaluation of constant expressions in linq4j

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3314:
URL: https://github.com/apache/calcite/pull/3314#issuecomment-1633421760

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3314)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3314=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3314=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3314=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_calcite=3314=false=CODE_SMELL)
   
   
[![84.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'84.8%')](https://sonarcloud.io/component_measures?id=apache_calcite=3314=new_coverage=list)
 [84.8% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3314=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3314=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3314=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] mihaibudiu opened a new pull request, #3314: [CALCITE-5843] Prevent parse error during evaluation of constant expressions in linq4j

2023-07-12 Thread via GitHub


mihaibudiu opened a new pull request, #3314:
URL: https://github.com/apache/calcite/pull/3314

   I wasn't entirely sure how to handle conversions to other types than the 
numeric ones, so I left the previous behavior unchanged, but there may be other 
problems lurking.


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3302: [CALCITE-5821] Add FORMAT_NUMBER function (enabled in Hive and Spark library)

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3302:
URL: https://github.com/apache/calcite/pull/3302#issuecomment-1633390122

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3302)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3302=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3302=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3302=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=CODE_SMELL)
 [5 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=CODE_SMELL)
   
   
[![97.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png
 
'97.3%')](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_coverage=list)
 [97.3% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3302: [CALCITE-5821] Add FORMAT_NUMBER function (enabled in Hive and Spark library)

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3302:
URL: https://github.com/apache/calcite/pull/3302#issuecomment-1633384319

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3302)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3302=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3302=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3302=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=CODE_SMELL)
 [5 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=CODE_SMELL)
   
   
[![97.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png
 
'97.3%')](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_coverage=list)
 [97.3% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] herunkang2018 commented on pull request #3302: [CALCITE-5821] Add FORMAT_NUMBER function (enabled in Hive and Spark library)

2023-07-12 Thread via GitHub


herunkang2018 commented on PR #3302:
URL: https://github.com/apache/calcite/pull/3302#issuecomment-1633374976

   @tanclary Thanks very kindly for you reviewing. I have rebased and squashed 
to one final commit.


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3313: [CALCITE-5841] Improve the logic of creating JDBCMeta singleton in calcite plus

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3313:
URL: https://github.com/apache/calcite/pull/3313#issuecomment-1632982138

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3313)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3313=false=BUG)
 
[![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png
 
'B')](https://sonarcloud.io/project/issues?id=apache_calcite=3313=false=BUG)
 [2 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3313=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3313=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3313=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3313=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3313=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3313=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3313=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3313=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3313=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3313=false=CODE_SMELL)
   
   
[![87.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'87.5%')](https://sonarcloud.io/component_measures?id=apache_calcite=3313=new_coverage=list)
 [87.5% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3313=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3313=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3313=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3310: [CALCITE-5836] Implement Rel2Sql for MERGE

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3310:
URL: https://github.com/apache/calcite/pull/3310#issuecomment-1632923024

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3310)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3310=false=BUG)
 
[![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png
 
'B')](https://sonarcloud.io/project/issues?id=apache_calcite=3310=false=BUG)
 [1 
Bug](https://sonarcloud.io/project/issues?id=apache_calcite=3310=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3310=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3310=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3310=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3310=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3310=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3310=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3310=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3310=false=CODE_SMELL)
 [8 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3310=false=CODE_SMELL)
   
   
[![88.2%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'88.2%')](https://sonarcloud.io/component_measures?id=apache_calcite=3310=new_coverage=list)
 [88.2% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3310=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3310=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3310=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[calcite] branch main updated: [CALCITE-5839] EnumerableInterpretable#StaticFieldDetector can overwrite its flag and return an incorrect result

2023-07-12 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 55f714cc37 [CALCITE-5839] EnumerableInterpretable#StaticFieldDetector 
can overwrite its flag and return an incorrect result
55f714cc37 is described below

commit 55f714cc37ca7d60a6c95196f404a370d6ff0dfd
Author: rubenada 
AuthorDate: Wed Jul 12 15:38:50 2023 +0100

[CALCITE-5839] EnumerableInterpretable#StaticFieldDetector can overwrite 
its flag and return an incorrect result
---
 .../enumerable/EnumerableInterpretable.java|   2 +-
 .../enumerable/StaticFieldDetectorTest.java| 115 +
 2 files changed, 116 insertions(+), 1 deletion(-)

diff --git 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableInterpretable.java
 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableInterpretable.java
index 922687df40..c92de30547 100644
--- 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableInterpretable.java
+++ 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableInterpretable.java
@@ -185,7 +185,7 @@ public class EnumerableInterpretable extends ConverterImpl
 boolean containsStaticField = false;
 
 @Override public Void visit(final FieldDeclaration fieldDeclaration) {
-  containsStaticField = (fieldDeclaration.modifier & Modifier.STATIC) != 0;
+  containsStaticField |= (fieldDeclaration.modifier & Modifier.STATIC) != 
0;
   return containsStaticField ? null : super.visit(fieldDeclaration);
 }
   }
diff --git 
a/core/src/test/java/org/apache/calcite/adapter/enumerable/StaticFieldDetectorTest.java
 
b/core/src/test/java/org/apache/calcite/adapter/enumerable/StaticFieldDetectorTest.java
new file mode 100644
index 00..ef28201912
--- /dev/null
+++ 
b/core/src/test/java/org/apache/calcite/adapter/enumerable/StaticFieldDetectorTest.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.calcite.adapter.enumerable;
+
+import org.apache.calcite.linq4j.tree.ClassDeclaration;
+import org.apache.calcite.linq4j.tree.Expressions;
+import org.apache.calcite.linq4j.tree.FieldDeclaration;
+
+import com.google.common.collect.ImmutableList;
+
+import org.junit.jupiter.api.Test;
+
+import java.lang.reflect.Modifier;
+import java.util.Arrays;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * Tests for {@link EnumerableInterpretable.StaticFieldDetector}.
+ */
+public final class StaticFieldDetectorTest {
+
+  @Test void testClassWithoutStaticFields() {
+ClassDeclaration classDeclaration =
+createClassDeclaration(
+new FieldDeclaration(
+Modifier.PUBLIC,
+Expressions.parameter(int.class, "x"),
+Expressions.constant(0)));
+
+EnumerableInterpretable.StaticFieldDetector detector =
+new EnumerableInterpretable.StaticFieldDetector();
+classDeclaration.accept(detector);
+assertThat(detector.containsStaticField, is(false));
+  }
+
+  @Test void testClassWithOnlyStaticFields() {
+ClassDeclaration classDeclaration =
+createClassDeclaration(
+new FieldDeclaration(
+Modifier.PUBLIC | Modifier.STATIC,
+Expressions.parameter(int.class, "x"),
+Expressions.constant(0)),
+new FieldDeclaration(
+Modifier.STATIC,
+Expressions.parameter(int.class, "y"),
+Expressions.constant(0)));
+
+EnumerableInterpretable.StaticFieldDetector detector =
+new EnumerableInterpretable.StaticFieldDetector();
+classDeclaration.accept(detector);
+assertThat(detector.containsStaticField, is(true));
+  }
+
+  @Test void testClassWithStaticAndNonStaticFields() {
+ClassDeclaration classDeclaration =
+createClassDeclaration(
+new FieldDeclaration(
+Modifier.PUBLIC | Modifier.STATIC,
+Expressions.parameter(int.class, "x"),
+

[GitHub] [calcite] rubenada merged pull request #3312: [CALCITE-5839] EnumerableInterpretable#StaticFieldDetector can overwrite its flag and return an incorrect result

2023-07-12 Thread via GitHub


rubenada merged PR #3312:
URL: https://github.com/apache/calcite/pull/3312


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3307: [CALCITE-5831] Add Soundex function (enabled in Spark library)

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3307:
URL: https://github.com/apache/calcite/pull/3307#issuecomment-1632761239

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3307)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3307=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3307=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3307=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3307=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3307=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3307=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3307=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3312: [CALCITE-5839] EnumerableInterpretable#StaticFieldDetector can overwrite its flag and return an incorrect result

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3312:
URL: https://github.com/apache/calcite/pull/3312#issuecomment-1632729833

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3312)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3312=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3312=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3312=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3312=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3312=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3312=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3312=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3312=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3312=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3312=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3312=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3312=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3312=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3312=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3312=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3312=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3302: [CALCITE-5821] Add FORMAT_NUMBER function (enabled in Hive and Spark library)

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3302:
URL: https://github.com/apache/calcite/pull/3302#issuecomment-1632722673

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3302)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3302=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3302=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3302=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=CODE_SMELL)
 [5 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3302=false=CODE_SMELL)
   
   
[![97.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png
 
'97.3%')](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_coverage=list)
 [97.3% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3302=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] thomasrebele commented on pull request #3312: [CALCITE-5839] EnumerableInterpretable#StaticFieldDetector can overwrite its flag and return an incorrect result

2023-07-12 Thread via GitHub


thomasrebele commented on PR #3312:
URL: https://github.com/apache/calcite/pull/3312#issuecomment-1632696681

   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 unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] rubenada opened a new pull request, #3312: [CALCITE-5839] EnumerableInterpretable#StaticFieldDetector can overwrite its flag and return an incorrect result

2023-07-12 Thread via GitHub


rubenada opened a new pull request, #3312:
URL: https://github.com/apache/calcite/pull/3312

   See details in CALCITE-5839


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3311: [CALCITE-5732] EnumerableHashJoin and EnumerableMergeJoin on composite key return rows matching condition 'null = null'

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3311:
URL: https://github.com/apache/calcite/pull/3311#issuecomment-1632622637

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3311)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3311=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3311=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3311=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3311=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3311=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3311=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3311=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3311=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3311=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3311=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3311=false=CODE_SMELL)
 [5 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3311=false=CODE_SMELL)
   
   
[![87.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'87.4%')](https://sonarcloud.io/component_measures?id=apache_calcite=3311=new_coverage=list)
 [87.4% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3311=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3311=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3311=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] herunkang2018 commented on a diff in pull request #3302: [CALCITE-5821] Add FORMAT_NUMBER function (enabled in Hive and Spark library)

2023-07-12 Thread via GitHub


herunkang2018 commented on code in PR #3302:
URL: https://github.com/apache/calcite/pull/3302#discussion_r1261200248


##
core/src/main/java/org/apache/calcite/util/BuiltInMethod.java:
##
@@ -417,6 +417,7 @@ public enum BuiltInMethod {
   INITCAP(SqlFunctions.class, "initcap", String.class),
   SUBSTRING(SqlFunctions.class, "substring", String.class, int.class,
   int.class),
+  FORMAT_NUMBER(SqlFunctions.class, "formatNumber", int.class, int.class),

Review Comment:
   The declared parameters type is only used to check whether there is a 
matched implemented method in the declared class, the related code line is 
[link](https://github.com/apache/calcite/blob/b2cdab28ad154f20dfb5ce19ec7fd4d772d6ea2c/core/src/main/java/org/apache/calcite/util/BuiltInMethod.java#L766).
 It doesn't check all implemented methods, it just validates only one, and if 
not found, it throws `NoSuchMethodException`. So this is a weak check here.
   
   IMO, there are two phases to validate function's parameters type and 
arguments type:
   
   In validate phase, the function's parameters type will be validated based 
the declared operand types.
   
   In execution phase, the generated code for expression will be compiled to 
class, if there is no matched method, including not matched parameters type, it 
will throws compilation error. Notice the code generation phase doesn't check 
the matchness of actual arguments type and function's parameters type.
   
   Please point out if there is something wrong.



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] herunkang2018 commented on a diff in pull request #3302: [CALCITE-5821] Add FORMAT_NUMBER function (enabled in Hive and Spark library)

2023-07-12 Thread via GitHub


herunkang2018 commented on code in PR #3302:
URL: https://github.com/apache/calcite/pull/3302#discussion_r1261200248


##
core/src/main/java/org/apache/calcite/util/BuiltInMethod.java:
##
@@ -417,6 +417,7 @@ public enum BuiltInMethod {
   INITCAP(SqlFunctions.class, "initcap", String.class),
   SUBSTRING(SqlFunctions.class, "substring", String.class, int.class,
   int.class),
+  FORMAT_NUMBER(SqlFunctions.class, "formatNumber", int.class, int.class),

Review Comment:
   The declared parameters type is only used to check whether there is a 
matched implemented method in the declared class, the related code line is 
[link](https://github.com/apache/calcite/blob/b2cdab28ad154f20dfb5ce19ec7fd4d772d6ea2c/core/src/main/java/org/apache/calcite/util/BuiltInMethod.java#L766).
 It doesn't check all implemented methods, it just validates only one, and if 
not found, it throws `NoSuchMethodException`. So this is a weak check here.
   
   IMO, there are two phases to validate function's parameters type and 
arguments type:
   
   In validate phase, the function's parameters type will be validated.
   
   In execution phase, the generated code for expression will be compiled to 
class, if there is no matched method, including not matched parameters type, it 
will throws compilation error. Notice the code generation phase doesn't check 
the matchness of actual arguments type and function's parameters type.
   
   Please point out if there is something wrong.



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite-avatica] snuyanzin commented on pull request #220: [CALCITE-5748] Guava 32.0.0-jre

2023-07-12 Thread via GitHub


snuyanzin commented on PR #220:
URL: https://github.com/apache/calcite-avatica/pull/220#issuecomment-1632255826

   the PR was created when only 32.0.0 was present, that's the reason
   i will update it


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[calcite-avatica] branch main updated: [CALCITE-5804] Upgrade jackson version from 2.14.1 to 2.15.2

2023-07-12 Thread zabetak
This is an automated email from the ASF dual-hosted git repository.

zabetak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git


The following commit(s) were added to refs/heads/main by this push:
 new c14bcdda6 [CALCITE-5804] Upgrade jackson version from 2.14.1 to 2.15.2
c14bcdda6 is described below

commit c14bcdda68f2abf8ca607a5176f19ec53d92212e
Author: Richard Antal 
AuthorDate: Fri Jun 30 14:30:05 2023 +0200

[CALCITE-5804] Upgrade jackson version from 2.14.1 to 2.15.2

Close apache/calcite-avatica#223
---
 gradle.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gradle.properties b/gradle.properties
index 481275002..e31fd4c3e 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -64,7 +64,7 @@ hsqldb.version=2.4.1
 h2.version=1.4.197
 httpclient5.version=5.1.3
 httpcore5.version=5.1.3
-jackson.version=2.14.1
+jackson.version=2.15.2
 jcip-annotations.version=1.0-1
 jcommander.version=1.72
 jetty.version=9.4.44.v20210927



[GitHub] [calcite-avatica] zabetak closed pull request #223: [CALCITE-5804] Bump jackson versions to 2.15.2

2023-07-12 Thread via GitHub


zabetak closed pull request #223: [CALCITE-5804] Bump jackson versions to 2.15.2
URL: https://github.com/apache/calcite-avatica/pull/223


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] chucheng92 commented on pull request #3307: [CALCITE-5831] Add Soundex function (enabled in Spark library)

2023-07-12 Thread via GitHub


chucheng92 commented on PR #3307:
URL: https://github.com/apache/calcite/pull/3307#issuecomment-1632101552

   @tanclary @olivrlee hi, I have addressed the problems and rebased 
calcite-main, PTAL. thanks.


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [calcite] sonarcloud[bot] commented on pull request #3307: [CALCITE-5831] Add Soundex function (enabled in Spark library)

2023-07-12 Thread via GitHub


sonarcloud[bot] commented on PR #3307:
URL: https://github.com/apache/calcite/pull/3307#issuecomment-1631946148

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3307)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3307=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3307=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3307=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3307=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3307=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3307=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3307=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3307=new_duplicated_lines_density=list)
   
   


-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org