xtern commented on code in PR #6274:
URL: https://github.com/apache/ignite-3/pull/6274#discussion_r2230329217


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/TypeUtils.java:
##########
@@ -598,6 +598,12 @@ public static boolean 
needCastInSearchBounds(IgniteTypeFactory typeFactory, RelD
             return false;
         }
 
+        // TIME, TIMESTAMP and TIMESTAMP_LTZ can use index, ignoring precision.
+        if (fromType.getSqlTypeName() == toType.getSqlTypeName()

Review Comment:
   For example, if we set a VARCHAR(3) column with the row 'abc' and in a query 
we search for 'abcd', I'd be surprised if we find 'abc' when we search for 
'abcd' without explicit casting. And vice versa. It doesn't meter do we search 
'00:00:00.12' or '00:00:00.120000000' - this is the same value of  time 
   
   The following tests have been added to check for correctness:
   testTemporalLookupPrecisionDynamicParam
   testTemporalLookupPrecisionLiteral
   testTemporalPrecisionGreaterLowerDynamicParam
   testTemporalPrecisionGreaterLowerLiteral



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to