You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ygerzhedovich (via GitHub)" <gi...@apache.org> on 2025/03/06 12:15:27 UTC
[PR] IGNITE-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
ygerzhedovich opened a new pull request, #5357:
URL: https://github.com/apache/ignite-3/pull/5357
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#discussion_r1986659598
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/varbinary/ItVarBinaryDmlTest.java:
##########
@@ -70,4 +71,10 @@ public void testInsertHexLiteral() {
protected DataTypeTestSpec<VarBinary> getTypeSpec() {
return DataTypeTestSpecs.VARBINARY_TYPE;
}
+
+ @Override
+ public void testUpdateFromLiteral(TestTypeArguments<VarBinary> arguments) {
Review Comment:
seems you can remove this test from base class too
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/tests/BaseJoinDataTypeTest.java:
##########
@@ -88,6 +74,7 @@ public void testNonEquijoin(String name, TestTypeArguments<T> arguments, String
runSql(insert1);
String insert2 = format("INSERT INTO t_join_{} (id, test_key) VALUES(2, {})", arguments.typeName(1), arguments.valueExpr(1));
+ System.out.println("!!!!3 " + insert2);
Review Comment:
debug log
--
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#issuecomment-2709586232
Also i can see that :
odbc-driver.adoc
```
The following SQL data types are supported:
- `SQL_BINARY`
```
do we need to extend documentation here ?
data-types.adoc
for CHAR type there is present an explanation
while for BINARY we can see that it just an alias:
```
VARBINARY
Possible values: binary data (“byte array”).
Aliases: BINARY, BINARY VARYING
```
is it ok ?
--
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich merged PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357
--
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#discussion_r1991356710
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDataTypesTest.java:
##########
@@ -746,9 +746,9 @@ public void charLimitationWithMergeUpdateOp() {
}
}
- @ParameterizedTest
- @CsvSource({"BINARY", "VARBINARY"})
- public void testErrorIfBinaryValueSizeGtThanTypePrecision(String type) {
+ @Test
+ public void testErrorIfBinaryValueSizeGtThanTypePrecision() {
+ String type = "VARBINARY";
Review Comment:
done
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDynamicParameterTest.java:
##########
@@ -237,9 +236,9 @@ public void testWithDifferentParametersTypes() {
}
/** Check that insertion value is trimmed if leading is zeroes. */
- @ParameterizedTest
- @CsvSource({"BINARY", "VARBINARY"})
- public void testInsertZeroContainedBinary(String type) {
+ @Test
+ public void testInsertZeroContainedBinary() {
+ String type = "VARBINARY";
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#issuecomment-2710997557
> Also i can see that : odbc-driver.adoc
>
> ```
> The following SQL data types are supported:
>
> - `SQL_BINARY`
> ```
>
> do we need to extend documentation here ?
>
> data-types.adoc for CHAR type there is present an explanation while for BINARY we can see that it just an alias:
>
> ```
> VARBINARY
> Possible values: binary data (“byte array”).
>
> Aliases: BINARY, BINARY VARYING
> ```
>
> is it ok ?
Yes,
The first point - can get these types (CHAR and BINARY)
The second point will be fixed during the release phase.
--
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "korlov42 (via GitHub)" <gi...@apache.org>.
korlov42 commented on code in PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#discussion_r1993456047
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDataTypesTest.java:
##########
@@ -746,9 +746,9 @@ public void charLimitationWithMergeUpdateOp() {
}
}
- @ParameterizedTest
- @CsvSource({"BINARY", "VARBINARY"})
- public void testErrorIfBinaryValueSizeGtThanTypePrecision(String type) {
+ @Test
+ public void testErrorIfBinaryValueSizeGtThanTypePrecision() {
+ String type = "VARBINARY";
Review Comment:
you've removed the variable but still uses string interpolation. Why?
--
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#discussion_r1991356940
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/varbinary/ItVarBinaryIndexTest.java:
##########
@@ -45,12 +45,12 @@ public class ItVarBinaryIndexTest extends BaseIndexDataTypeTest<VarBinary> {
@BeforeAll
public void createTable() {
- runSql("CREATE TABLE binary_fixed_length(id INTEGER PRIMARY KEY, test_key BINARY(10))");
- runSql("CREATE INDEX binary_fixed_length_test_key_idx on binary_fixed_length (test_key)");
+ runSql("CREATE TABLE varbinary_fixed_length(id INTEGER PRIMARY KEY, test_key VARBINARY(10))");
Review Comment:
fixed
--
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#discussion_r1993591998
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDataTypesTest.java:
##########
@@ -746,9 +746,9 @@ public void charLimitationWithMergeUpdateOp() {
}
}
- @ParameterizedTest
- @CsvSource({"BINARY", "VARBINARY"})
- public void testErrorIfBinaryValueSizeGtThanTypePrecision(String type) {
+ @Test
+ public void testErrorIfBinaryValueSizeGtThanTypePrecision() {
+ String type = "VARBINARY";
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#discussion_r1986857027
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/varbinary/ItVarBinaryDmlTest.java:
##########
@@ -70,4 +71,10 @@ public void testInsertHexLiteral() {
protected DataTypeTestSpec<VarBinary> getTypeSpec() {
return DataTypeTestSpecs.VARBINARY_TYPE;
}
+
+ @Override
+ public void testUpdateFromLiteral(TestTypeArguments<VarBinary> arguments) {
Review Comment:
yep, thanks. Fixed
--
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#discussion_r1986856550
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/tests/BaseJoinDataTypeTest.java:
##########
@@ -88,6 +74,7 @@ public void testNonEquijoin(String name, TestTypeArguments<T> arguments, String
runSql(insert1);
String insert2 = format("INSERT INTO t_join_{} (id, test_key) VALUES(2, {})", arguments.typeName(1), arguments.valueExpr(1));
+ System.out.println("!!!!3 " + insert2);
Review Comment:
thanks, fixed
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/varbinary/ItVarBinaryDmlTest.java:
##########
@@ -70,4 +71,10 @@ public void testInsertHexLiteral() {
protected DataTypeTestSpec<VarBinary> getTypeSpec() {
return DataTypeTestSpecs.VARBINARY_TYPE;
}
+
+ @Override
+ public void testUpdateFromLiteral(TestTypeArguments<VarBinary> arguments) {
Review Comment:
yep, thanks. Foxed
--
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#discussion_r1991357235
##########
modules/sql-engine/src/integrationTest/sql/group1/types/blob/test_blob.test:
##########
@@ -76,28 +76,22 @@ SELECT NULL::VARBINARY
----
NULL
-statement error: BINARY length 0 must be between 1 and 2147483647. [column=C1]
-CREATE TABLE t_invalid_length(c1 BINARY(0));
-
statement error: VARBINARY length 0 must be between 1 and 2147483647. [column=C1]
CREATE TABLE t_invalid_length(c1 VARBINARY(0));
-statement error: BINARY length 0 must be between 1 and 2147483647
-SELECT CAST(x'0101' AS BINARY(0))
Review Comment:
you are right, return it back
--
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-24429 Sql. Get rid of support of BINARY datatype. [ignite-3]
Posted by "korlov42 (via GitHub)" <gi...@apache.org>.
korlov42 commented on code in PR #5357:
URL: https://github.com/apache/ignite-3/pull/5357#discussion_r1991284845
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDataTypesTest.java:
##########
@@ -746,9 +746,9 @@ public void charLimitationWithMergeUpdateOp() {
}
}
- @ParameterizedTest
- @CsvSource({"BINARY", "VARBINARY"})
- public void testErrorIfBinaryValueSizeGtThanTypePrecision(String type) {
+ @Test
+ public void testErrorIfBinaryValueSizeGtThanTypePrecision() {
+ String type = "VARBINARY";
Review Comment:
why don't simply inline?
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDynamicParameterTest.java:
##########
@@ -237,9 +236,9 @@ public void testWithDifferentParametersTypes() {
}
/** Check that insertion value is trimmed if leading is zeroes. */
- @ParameterizedTest
- @CsvSource({"BINARY", "VARBINARY"})
- public void testInsertZeroContainedBinary(String type) {
+ @Test
+ public void testInsertZeroContainedBinary() {
+ String type = "VARBINARY";
Review Comment:
the same: let's inline
##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/datatypes/varbinary/ItVarBinaryIndexTest.java:
##########
@@ -45,12 +45,12 @@ public class ItVarBinaryIndexTest extends BaseIndexDataTypeTest<VarBinary> {
@BeforeAll
public void createTable() {
- runSql("CREATE TABLE binary_fixed_length(id INTEGER PRIMARY KEY, test_key BINARY(10))");
- runSql("CREATE INDEX binary_fixed_length_test_key_idx on binary_fixed_length (test_key)");
+ runSql("CREATE TABLE varbinary_fixed_length(id INTEGER PRIMARY KEY, test_key VARBINARY(10))");
Review Comment:
> `varbinary_fixed_length`
so... is it varbinary or fixed length?
##########
modules/sql-engine/src/integrationTest/sql/group1/types/blob/test_blob.test:
##########
@@ -76,28 +76,22 @@ SELECT NULL::VARBINARY
----
NULL
-statement error: BINARY length 0 must be between 1 and 2147483647. [column=C1]
-CREATE TABLE t_invalid_length(c1 BINARY(0));
-
statement error: VARBINARY length 0 must be between 1 and 2147483647. [column=C1]
CREATE TABLE t_invalid_length(c1 VARBINARY(0));
-statement error: BINARY length 0 must be between 1 and 2147483647
-SELECT CAST(x'0101' AS BINARY(0))
Review Comment:
why did you removed this case?
--
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