You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "zstan (via GitHub)" <gi...@apache.org> on 2023/09/12 06:49:23 UTC

[GitHub] [ignite-3] zstan opened a new pull request, #2576: IGNITE-20226 Sql. Fix muted tests after disallowed char -> varbinary casting

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

   …casting
   
   Thank you for submitting the pull request.
   
   To streamline the review process of the patch and ensure better code quality
   we ask both an author and a reviewer to verify the following:
   
   ### The Review Checklist
   - [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:  
   \- There is a single JIRA ticket related to the pull request.  
   \- The web-link to the pull request is attached to the JIRA ticket.  
   \- The JIRA ticket has the Patch Available state.  
   \- The description of the JIRA ticket explains WHAT was made, WHY and HOW.  
   \- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
   - [ ] **Design:** new code conforms with the design principles of the components it is added to.
   - [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
   - [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
   - [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
   
   ### Notes
   - [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)


-- 
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


[GitHub] [ignite-3] ygerzhedovich commented on a diff in pull request #2576: IGNITE-20226 Sql. Fix muted tests after disallowed char -> varbinary casting

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/uuid/ItUuidDmlTest.java:
##########
@@ -17,16 +17,78 @@
 
 package org.apache.ignite.internal.sql.engine.datatypes.uuid;
 
+import static org.apache.ignite.lang.IgniteStringFormatter.format;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
 import java.util.UUID;
 import org.apache.ignite.internal.sql.engine.datatypes.DataTypeTestSpecs;
 import org.apache.ignite.internal.sql.engine.datatypes.tests.BaseDmlDataTypeTest;
 import org.apache.ignite.internal.sql.engine.datatypes.tests.DataTypeTestSpec;
+import org.apache.ignite.internal.sql.engine.datatypes.tests.TestTypeArguments;
 import org.apache.ignite.internal.sql.engine.type.UuidType;
+import org.apache.ignite.lang.IgniteException;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 
 /**
  * Tests for DML statements for {@link UuidType UUID data type}.
  */
 public class ItUuidDmlTest extends BaseDmlDataTypeTest<UUID> {
+    /** {@code INSERT} with dynamic parameters is not allowed for compatible types. */
+    @ParameterizedTest
+    @MethodSource("convertedFrom")
+    public void testInsertFromDynamicParameterFromConvertible(TestTypeArguments arguments) {
+        var t = assertThrows(IgniteException.class, () -> {

Review Comment:
   like this
   `
           assertThrowsSqlException(
                   Sql.STMT_VALIDATION_ERR,
                   "Values passed to VALUES operator must have compatible types",
                   () -> runSql("INSERT INTO t VALUES (1, ?)", arguments.argValue(0))
           );
   `



-- 
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


[GitHub] [ignite-3] zstan commented on pull request #2576: IGNITE-20226 Sql. Fix muted tests after disallowed char -> varbinary casting

Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on PR #2576:
URL: https://github.com/apache/ignite-3/pull/2576#issuecomment-1715209045

   @lowka can you make a review plz ?


-- 
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


[GitHub] [ignite-3] zstan merged pull request #2576: IGNITE-20226 Sql. Fix muted tests after disallowed char -> varbinary casting

Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan merged PR #2576:
URL: https://github.com/apache/ignite-3/pull/2576


-- 
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


[GitHub] [ignite-3] ygerzhedovich commented on a diff in pull request #2576: IGNITE-20226 Sql. Fix muted tests after disallowed char -> varbinary casting

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/uuid/ItUuidExpressionTest.java:
##########
@@ -65,6 +70,31 @@ public void testInvalidUuidStringInDynamicParams() {
         assertThat(t.getMessage(), containsString("Invalid UUID string"));
     }
 
+    /**
+     * {@code COALESCE} operator does not allow different types in its arguments.
+     */
+    @ParameterizedTest
+    @MethodSource("convertedFrom")
+    public void testCoalesceMissingTypesIsIllegal(TestTypeArguments arguments) {
+        IgniteException t = assertThrows(IgniteException.class, () -> {

Review Comment:
   let's fix all places. It should be also 'assertThrowsSqlException' with error code check



-- 
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


[GitHub] [ignite-3] ygerzhedovich commented on a diff in pull request #2576: IGNITE-20226 Sql. Fix muted tests after disallowed char -> varbinary casting

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/uuid/ItUuidDmlTest.java:
##########
@@ -17,16 +17,78 @@
 
 package org.apache.ignite.internal.sql.engine.datatypes.uuid;
 
+import static org.apache.ignite.lang.IgniteStringFormatter.format;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
 import java.util.UUID;
 import org.apache.ignite.internal.sql.engine.datatypes.DataTypeTestSpecs;
 import org.apache.ignite.internal.sql.engine.datatypes.tests.BaseDmlDataTypeTest;
 import org.apache.ignite.internal.sql.engine.datatypes.tests.DataTypeTestSpec;
+import org.apache.ignite.internal.sql.engine.datatypes.tests.TestTypeArguments;
 import org.apache.ignite.internal.sql.engine.type.UuidType;
+import org.apache.ignite.lang.IgniteException;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 
 /**
  * Tests for DML statements for {@link UuidType UUID data type}.
  */
 public class ItUuidDmlTest extends BaseDmlDataTypeTest<UUID> {
+    /** {@code INSERT} with dynamic parameters is not allowed for compatible types. */
+    @ParameterizedTest
+    @MethodSource("convertedFrom")
+    public void testInsertFromDynamicParameterFromConvertible(TestTypeArguments arguments) {
+        var t = assertThrows(IgniteException.class, () -> {

Review Comment:
   please use `org.apache.ignite.internal.sql.engine.util.SqlTestUtils#assertThrowsSqlException`
   



-- 
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


[GitHub] [ignite-3] zstan commented on a diff in pull request #2576: IGNITE-20226 Sql. Fix muted tests after disallowed char -> varbinary casting

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


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/uuid/ItUuidDmlTest.java:
##########
@@ -17,16 +17,78 @@
 
 package org.apache.ignite.internal.sql.engine.datatypes.uuid;
 
+import static org.apache.ignite.lang.IgniteStringFormatter.format;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
 import java.util.UUID;
 import org.apache.ignite.internal.sql.engine.datatypes.DataTypeTestSpecs;
 import org.apache.ignite.internal.sql.engine.datatypes.tests.BaseDmlDataTypeTest;
 import org.apache.ignite.internal.sql.engine.datatypes.tests.DataTypeTestSpec;
+import org.apache.ignite.internal.sql.engine.datatypes.tests.TestTypeArguments;
 import org.apache.ignite.internal.sql.engine.type.UuidType;
+import org.apache.ignite.lang.IgniteException;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 
 /**
  * Tests for DML statements for {@link UuidType UUID data type}.
  */
 public class ItUuidDmlTest extends BaseDmlDataTypeTest<UUID> {
+    /** {@code INSERT} with dynamic parameters is not allowed for compatible types. */
+    @ParameterizedTest
+    @MethodSource("convertedFrom")
+    public void testInsertFromDynamicParameterFromConvertible(TestTypeArguments arguments) {
+        var t = assertThrows(IgniteException.class, () -> {

Review Comment:
   @ygerzhedovich fixed but this activity beyond the scope of this issue.



-- 
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


[GitHub] [ignite-3] zstan commented on pull request #2576: IGNITE-20226 Sql. Fix muted tests after disallowed char -> varbinary casting

Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on PR #2576:
URL: https://github.com/apache/ignite-3/pull/2576#issuecomment-1721012178

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

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