You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "xtern (via GitHub)" <gi...@apache.org> on 2024/06/14 10:37:04 UTC

[PR] IGNITE-22480 [ignite-3]

xtern opened a new pull request, #3922:
URL: https://github.com/apache/ignite-3/pull/3922

   https://issues.apache.org/jira/browse/IGNITE-22480


-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-22480 Sql. Avoid compiling literal-only expressions when assembling a row for insert [ignite-3]

Posted by "lowka (via GitHub)" <gi...@apache.org>.
lowka commented on code in PR #3922:
URL: https://github.com/apache/ignite-3/pull/3922#discussion_r1644491001


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/exp/ExpressionFactoryImpl.java:
##########
@@ -343,6 +345,17 @@ public Iterable<RowT> values(List<RexLiteral> values, RelDataType rowType) {
         return rows;
     }
 
+    private @Nullable Object literalValue(RexLiteral literal, Class<?> type) {
+        Object val = literal.getValueAs(type);
+
+        // Literal was parsed as UTC timestamp, now we need to adjust it to the client's time zone.
+        if (val != null && literal.getTypeName() == SqlTypeName.TIMESTAMP_WITH_LOCAL_TIME_ZONE) {

Review Comment:
   Should we adjust `TIME_WITH_LOCAL_TIME_ZONE` as well?



-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-22480 Sql. Avoid compiling literal-only expressions when assembling a row for insert [ignite-3]

Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern commented on code in PR #3922:
URL: https://github.com/apache/ignite-3/pull/3922#discussion_r1644507313


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/exp/ExpressionFactoryImpl.java:
##########
@@ -343,6 +345,17 @@ public Iterable<RowT> values(List<RexLiteral> values, RelDataType rowType) {
         return rows;
     }
 
+    private @Nullable Object literalValue(RexLiteral literal, Class<?> type) {
+        Object val = literal.getValueAs(type);
+
+        // Literal was parsed as UTC timestamp, now we need to adjust it to the client's time zone.
+        if (val != null && literal.getTypeName() == SqlTypeName.TIMESTAMP_WITH_LOCAL_TIME_ZONE) {

Review Comment:
   we have separate ticket for this https://issues.apache.org/jira/browse/IGNITE-21555



-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-22480 Sql. Avoid compiling literal-only expressions when assembling a row for insert [ignite-3]

Posted by "lowka (via GitHub)" <gi...@apache.org>.
lowka commented on code in PR #3922:
URL: https://github.com/apache/ignite-3/pull/3922#discussion_r1644506331


##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/exp/ExpressionFactoryImplTest.java:
##########
@@ -704,8 +701,36 @@ public void testRowSource() {
         RexNode val10 = rexBuilder.makeExactLiteral(new BigDecimal("1"), intType);
         RexNode val11 = rexBuilder.makeExactLiteral(new BigDecimal("2"), bigIntType);

Review Comment:
   1. I think we need to ensure that DECIMAL values preserve precision/scale after this transformation.
   2. Ideally, we need to check literals of all types here.



-- 
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: notifications-unsubscribe@ignite.apache.org

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