You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "AMashenkov (via GitHub)" <gi...@apache.org> on 2023/02/10 09:52:15 UTC
[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #1651: IGNITE-18492 SQL. Inconsistent behavior of LENGTH limit for CHAR and VARCHAR data types
AMashenkov commented on code in PR #1651:
URL: https://github.com/apache/ignite-3/pull/1651#discussion_r1102531173
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDataTypesTest.java:
##########
@@ -86,6 +87,23 @@ public void testUnicodeStrings() {
}
}
+ /** Test correctness of char types limitation. */
+ @Test
+ public void charLimitation() {
+ sql("create table limitedChar (pk int primary key, f1 VARCHAR(5), f2 CHAR(4))");
+ assertThrows(CalciteContextException.class, () -> sql("insert into limitedChar(pk, f2) values (1, 'aaaadddd')"));
+ assertThrows(CalciteContextException.class, () -> sql("insert into limitedChar values (2, 'aaaaabbbbb', 'aaaadddd')"));
Review Comment:
```suggestion
assertThrows(CalciteContextException.class, () -> sql("insert into limitedChar(pk, f1) values (2, 'aaaaabbbbb')"));
```
Let's check CHAR and VARCHAR columns independently.
--
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