You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "snuyanzin (via GitHub)" <gi...@apache.org> on 2023/03/12 13:49:41 UTC

[GitHub] [calcite] snuyanzin opened a new pull request, #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

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

   The PR adds support of `TIMESTAMP WITH LOCAL TIME ZONE` for Snapshot and MatchRecognize.
   
   I added 2 `TIMESTAMP WITH LOCAL TIME ZONE` columns in `PRODUCTS_TEMPORAL` table.
   It seems `MockCatalogReaderSimple#init` is pretty large since checkstyle starts complaining about method length after that. I noticed that constraint for views is the same, that's why i extracted it into a separate method and it solved issue with method length without touching checkstyle config.


-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] libenchao commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "libenchao (via GitHub)" <gi...@apache.org>.
libenchao commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1538162723

   @snuyanzin Thanks for the work, and "This change will allow to remove SqlValidatorImpl from Flink code" sounds exciting, I'll give it a review in a few days.


-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] snuyanzin commented on a diff in pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on code in PR #3106:
URL: https://github.com/apache/calcite/pull/3106#discussion_r1188005585


##########
core/src/test/java/org/apache/calcite/test/RelBuilderTest.java:
##########
@@ -495,6 +495,30 @@ static RelBuilder createBuilder(UnaryOperator<RelBuilder.Config> transform) {
     assertThat(root, hasTree(expected));
   }
 
+  @Test void testJoinTemporalTableForTimestampWithLocalTimezone() {
+    // Equivalent SQL:
+    //   SELECT *
+    //   FROM orders
+    //   JOIN products_temporal FOR SYSTEM_TIME AS OF TIMESTAMP '2011-07-20 12:34:56'

Review Comment:
   done



-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] snuyanzin commented on a diff in pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on code in PR #3106:
URL: https://github.com/apache/calcite/pull/3106#discussion_r1188008916


##########
core/src/main/java/org/apache/calcite/rel/core/Snapshot.java:
##########
@@ -131,7 +131,8 @@ public RexNode getPeriod() {
 
   @Override public boolean isValid(Litmus litmus, @Nullable Context context) {
     RelDataType dataType = period.getType();
-    if (dataType.getSqlTypeName() != SqlTypeName.TIMESTAMP) {
+    if (dataType.getSqlTypeName() != SqlTypeName.TIMESTAMP

Review Comment:
   yes, you are right, 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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] sonarcloud[bot] commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1539230842

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![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&pullRequest=3106)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=CODE_SMELL)
   
   [![94.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png '94.4%')](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_coverage&view=list) [94.4% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_coverage&view=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&pullRequest=3106&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_duplicated_lines_density&view=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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] sonarcloud[bot] commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1475045729

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![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&pullRequest=3106)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=CODE_SMELL)
   
   [![95.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png '95.8%')](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_coverage&view=list) [95.8% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_coverage&view=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&pullRequest=3106&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_duplicated_lines_density&view=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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] snuyanzin commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1475042071

   Thanks @zoudan 
   Since mentioned PR is merged https://github.com/apache/calcite/pull/3111
   The current one is now rebased


-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] snuyanzin commented on a diff in pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on code in PR #3106:
URL: https://github.com/apache/calcite/pull/3106#discussion_r1188005696


##########
core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java:
##########
@@ -1246,6 +1246,14 @@ public static void checkActualAndReferenceFiles() {
     sql(sql).ok();
   }
 
+  @Test void testJoinTemporalTableOnSpecificTimeWithLocalTimeZone() {

Review Comment:
   done



-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] snuyanzin commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1544677646

   @libenchao , @chunweilei , @zoudan 
   thanks a lot for having a look!


-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] snuyanzin commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1537517105

   @libenchao sorry for the poke
   may I ask you to have a look?
   This change will allow to remove `SqlValidatorImpl` from Flink code


-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] snuyanzin closed pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin closed pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize
URL: https://github.com/apache/calcite/pull/3106


-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] sonarcloud[bot] commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1539239809

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![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&pullRequest=3106)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=CODE_SMELL)
   
   [![93.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png '93.3%')](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_coverage&view=list) [93.3% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_coverage&view=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&pullRequest=3106&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_duplicated_lines_density&view=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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] zoudan commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "zoudan (via GitHub)" <gi...@apache.org>.
zoudan commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1469192207

   @snuyanzin we have raised a [jira](https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-5574) to split `MockCatalogReaderSimple#init` and I have created an [PR](https://github.com/apache/calcite/pull/3111) for this.


-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] sonarcloud[bot] commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1465208889

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![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&pullRequest=3106)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=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&pullRequest=3106&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=3106&resolved=false&types=CODE_SMELL)
   
   [![97.7%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png '97.7%')](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_coverage&view=list) [97.7% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_coverage&view=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&pullRequest=3106&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=3106&metric=new_duplicated_lines_density&view=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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] snuyanzin commented on pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on PR #3106:
URL: https://github.com/apache/calcite/pull/3106#issuecomment-1539231458

   Thanks for having a look


-- 
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-unsubscribe@calcite.apache.org

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


[GitHub] [calcite] libenchao commented on a diff in pull request #3106: [CALCITE-4554] Support TIMESTAMP WITH LOCAL TIME ZONE for Snapshot and MatchRecognize

Posted by "libenchao (via GitHub)" <gi...@apache.org>.
libenchao commented on code in PR #3106:
URL: https://github.com/apache/calcite/pull/3106#discussion_r1187324497


##########
core/src/main/java/org/apache/calcite/rel/core/Snapshot.java:
##########
@@ -131,7 +131,8 @@ public RexNode getPeriod() {
 
   @Override public boolean isValid(Litmus litmus, @Nullable Context context) {
     RelDataType dataType = period.getType();
-    if (dataType.getSqlTypeName() != SqlTypeName.TIMESTAMP) {
+    if (dataType.getSqlTypeName() != SqlTypeName.TIMESTAMP

Review Comment:
   We can use `SqlTypeUtil#isTimestamp`?



##########
core/src/test/java/org/apache/calcite/test/RelBuilderTest.java:
##########
@@ -495,6 +495,30 @@ static RelBuilder createBuilder(UnaryOperator<RelBuilder.Config> transform) {
     assertThat(root, hasTree(expected));
   }
 
+  @Test void testJoinTemporalTableForTimestampWithLocalTimezone() {
+    // Equivalent SQL:
+    //   SELECT *
+    //   FROM orders
+    //   JOIN products_temporal FOR SYSTEM_TIME AS OF TIMESTAMP '2011-07-20 12:34:56'

Review Comment:
   ```suggestion
       //   JOIN products_temporal FOR SYSTEM_TIME AS OF TIMESTAMP WITH LOCAL TIME ZONE '2011-07-20 12:34:56'
   ```



##########
core/src/test/java/org/apache/calcite/test/RelBuilderTest.java:
##########
@@ -495,6 +495,30 @@ static RelBuilder createBuilder(UnaryOperator<RelBuilder.Config> transform) {
     assertThat(root, hasTree(expected));
   }
 
+  @Test void testJoinTemporalTableForTimestampWithLocalTimezone() {
+    // Equivalent SQL:
+    //   SELECT *
+    //   FROM orders
+    //   JOIN products_temporal FOR SYSTEM_TIME AS OF TIMESTAMP '2011-07-20 12:34:56'

Review Comment:
   ```suggestion
       //   JOIN products_temporal FOR SYSTEM_TIME AS OF TIMESTAMP WITH LOCAL TIME ZONE '2011-07-20 12:34:56'
   ```



##########
core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java:
##########
@@ -1246,6 +1246,14 @@ public static void checkActualAndReferenceFiles() {
     sql(sql).ok();
   }
 
+  @Test void testJoinTemporalTableOnSpecificTimeWithLocalTimeZone() {

Review Comment:
   ```suggestion
     @Test void testJoinTemporalTableOnSpecificTimestampWithLocalTimeZone() {
   ```



-- 
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-unsubscribe@calcite.apache.org

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