zstan commented on code in PR #2223:
URL: https://github.com/apache/ignite-3/pull/2223#discussion_r1238120187


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/varbinary/ItVarBinaryExpressionTest.java:
##########
@@ -67,24 +67,32 @@ public void testPositionExpressionWithDynamicParameter() {
                 .check();
     }
 
-    /** {@code LENGTH} expression. */
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-19668";)
+    /** {@code LENGTH} and {@code OCTET_LENGTH} expression. */
     @Test
     public void testLengthExpression() {
         checkQuery("SELECT LENGTH(x'010203')")
-                .withParams(varBinary(new byte[]{2}))
+                .returns(3).check();
+
+        checkQuery("SELECT OCTET_LENGTH(x'010203')")
                 .returns(3).check();
     }
 
-    /** {@code LENGTH} expression. */
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-19668";)
+    /** {@code LENGTH} and {@code OCTET_LENGTH} expression with dynamic 
params. */
     @Test
     public void testLengthExpressionWithDynamicParameter() {
-        checkQuery("SELECT LENGTH(?)")
+        checkQuery("SELECT OCTET_LENGTH(?)")
+                .withParams(varBinary(new byte[]{1, 2, 3}))
+                .returns(3).check();
+
+        checkQuery("SELECT OCTET_LENGTH(?)")
+                .withParams(varBinary(new byte[0]))
+                .returns(0).check();
+
+        checkQuery("SELECT LENGTH(CAST (? AS VARCHAR))")
                 .withParams(varBinary(new byte[]{1, 2, 3}))
                 .returns(3).check();
 
-        checkQuery("SELECT LENGTH(?)")
+        checkQuery("SELECT LENGTH(CAST (? AS VARCHAR))")

Review Comment:
   just to make sure that it works with cast too



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to