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 2024/01/08 09:29:04 UTC

[PR] IGNITE-20885 Sql. Bump calcite version to 1.36 [ignite-3]

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

   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


Re: [PR] IGNITE-20885 Sql. Bump calcite version to 1.36 [ignite-3]

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


##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -516,7 +516,8 @@ public void testInsertDefaultValue() {
     public void testInsertDefaultNullValue() {
         checkDefaultValue(defaultValueArgs()
                 .filter(a -> !a.sqlType.endsWith("NOT NULL"))
-                .map(a -> new DefaultValueArg(a.sqlType, "NULL", null))
+                // TODO: uncomment after https://ggsystems.atlassian.net/browse/IGN-23514

Review Comment:
   of course, done



##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/sql/DecimalLiteralTest.java:
##########
@@ -20,64 +20,32 @@
 import static org.apache.ignite.internal.lang.IgniteStringFormatter.format;
 import static org.apache.ignite.internal.sql.engine.util.SqlTestUtils.assertThrowsSqlException;
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import java.math.BigDecimal;
 import java.util.List;
 import org.apache.calcite.rel.type.RelDataType;
-import org.apache.calcite.sql.SqlLiteral;
 import org.apache.calcite.sql.SqlNode;
-import org.apache.calcite.sql.SqlWriter;
-import org.apache.calcite.sql.parser.SqlParserPos;
-import org.apache.calcite.sql.pretty.SqlPrettyWriter;
-import org.apache.calcite.sql.type.SqlTypeName;
-import org.apache.calcite.util.Litmus;
 import org.apache.ignite.internal.sql.engine.planner.AbstractPlannerTest;
 import org.apache.ignite.internal.sql.engine.rel.IgniteRel;
 import org.apache.ignite.internal.sql.engine.schema.IgniteSchema;
-import org.apache.ignite.internal.sql.engine.util.Commons;
 import org.apache.ignite.lang.ErrorGroups.Sql;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.CsvSource;
 import org.junit.jupiter.params.provider.ValueSource;
 
 /**
- * Tests for {@link IgniteSqlDecimalLiteral}.
+ * Tests for decimal literals, like: DECIMAL '99.999'.
  */
-public class IgniteSqlDecimalLiteralTest extends AbstractPlannerTest {
-
-    /**
-     * Tests literal type type.
-     */
-    @Test
-    public void testValueAndType() {
-        var input = new BigDecimal("100.20");
-        var literal = IgniteSqlDecimalLiteral.create(input, SqlParserPos.ZERO);
-        assertTrue(literal.isExact(), "decimal is always exact");
-
-        assertEquals(5, literal.getPrec(), "precision");
-        assertEquals(2, literal.getScale(), "scale");
-
-        assertEquals(input, literal.getValue(), "value");
-
-        var typeFactory = Commons.typeFactory();
-        var actualType = literal.createSqlType(typeFactory);
-
-        var expectedType = typeFactory.createSqlType(SqlTypeName.DECIMAL, input.precision(), input.scale());
-        assertEquals(expectedType, actualType, "type");
-    }
-
+public class DecimalLiteralTest extends AbstractPlannerTest {
     /**
      * Type of numeric decimal literal and type of decimal literal should match.
      */
+    //TODO: uncomment below after https://ggsystems.atlassian.net/browse/IGN-23516")

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

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


Re: [PR] IGNITE-20885 Sql. Bump calcite version to 1.36 [ignite-3]

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


##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -516,7 +516,8 @@ public void testInsertDefaultValue() {
     public void testInsertDefaultNullValue() {
         checkDefaultValue(defaultValueArgs()
                 .filter(a -> !a.sqlType.endsWith("NOT NULL"))
-                .map(a -> new DefaultValueArg(a.sqlType, "NULL", null))
+                // TODO: uncomment after https://ggsystems.atlassian.net/browse/IGN-23514

Review Comment:
   please use  correct link



-- 
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-20885 Sql. Bump calcite version to 1.36 [ignite-3]

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


-- 
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-20885 Sql. Bump calcite version to 1.36 [ignite-3]

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


##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/sql/DecimalLiteralTest.java:
##########
@@ -20,64 +20,32 @@
 import static org.apache.ignite.internal.lang.IgniteStringFormatter.format;
 import static org.apache.ignite.internal.sql.engine.util.SqlTestUtils.assertThrowsSqlException;
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import java.math.BigDecimal;
 import java.util.List;
 import org.apache.calcite.rel.type.RelDataType;
-import org.apache.calcite.sql.SqlLiteral;
 import org.apache.calcite.sql.SqlNode;
-import org.apache.calcite.sql.SqlWriter;
-import org.apache.calcite.sql.parser.SqlParserPos;
-import org.apache.calcite.sql.pretty.SqlPrettyWriter;
-import org.apache.calcite.sql.type.SqlTypeName;
-import org.apache.calcite.util.Litmus;
 import org.apache.ignite.internal.sql.engine.planner.AbstractPlannerTest;
 import org.apache.ignite.internal.sql.engine.rel.IgniteRel;
 import org.apache.ignite.internal.sql.engine.schema.IgniteSchema;
-import org.apache.ignite.internal.sql.engine.util.Commons;
 import org.apache.ignite.lang.ErrorGroups.Sql;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.CsvSource;
 import org.junit.jupiter.params.provider.ValueSource;
 
 /**
- * Tests for {@link IgniteSqlDecimalLiteral}.
+ * Tests for decimal literals, like: DECIMAL '99.999'.
  */
-public class IgniteSqlDecimalLiteralTest extends AbstractPlannerTest {
-
-    /**
-     * Tests literal type type.
-     */
-    @Test
-    public void testValueAndType() {
-        var input = new BigDecimal("100.20");
-        var literal = IgniteSqlDecimalLiteral.create(input, SqlParserPos.ZERO);
-        assertTrue(literal.isExact(), "decimal is always exact");
-
-        assertEquals(5, literal.getPrec(), "precision");
-        assertEquals(2, literal.getScale(), "scale");
-
-        assertEquals(input, literal.getValue(), "value");
-
-        var typeFactory = Commons.typeFactory();
-        var actualType = literal.createSqlType(typeFactory);
-
-        var expectedType = typeFactory.createSqlType(SqlTypeName.DECIMAL, input.precision(), input.scale());
-        assertEquals(expectedType, actualType, "type");
-    }
-
+public class DecimalLiteralTest extends AbstractPlannerTest {
     /**
      * Type of numeric decimal literal and type of decimal literal should match.
      */
+    //TODO: uncomment below after https://ggsystems.atlassian.net/browse/IGN-23516")

Review Comment:
   link



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