@@ -321,16 +321,18 @@ protected static int readColumn(String args, int startIndex, int len, String nam
321
321
StringBuilder sb = new StringBuilder ();
322
322
i = ClickHouseUtils .readNameOrQuotedString (args , i , len , sb );
323
323
String modifier = sb .toString ();
324
+ String normalizedModifier = modifier .toUpperCase ();
324
325
sb .setLength (0 );
325
326
boolean startsWithNot = false ;
326
- if ("not" . equalsIgnoreCase ( modifier )) {
327
+ if ("NOT" . equals ( normalizedModifier )) {
327
328
startsWithNot = true ;
328
329
i = ClickHouseUtils .readNameOrQuotedString (args , i , len , sb );
329
330
modifier = sb .toString ();
331
+ normalizedModifier = modifier .toUpperCase ();
330
332
sb .setLength (0 );
331
333
}
332
334
333
- if ("null" . equalsIgnoreCase ( modifier )) {
335
+ if ("NULL" . equals ( normalizedModifier )) {
334
336
if (nullable ) {
335
337
throw new IllegalArgumentException ("Nullable and NULL cannot be used together" );
336
338
}
@@ -339,14 +341,14 @@ protected static int readColumn(String args, int startIndex, int len, String nam
339
341
break ;
340
342
} else if (startsWithNot ) {
341
343
throw new IllegalArgumentException ("Expect keyword NULL after NOT" );
342
- } else if ("alias" . equalsIgnoreCase ( modifier ) || "codec" . equalsIgnoreCase ( modifier )
343
- || "default" . equalsIgnoreCase ( modifier ) || "materialized" . equalsIgnoreCase ( modifier )
344
- || "ttl" . equalsIgnoreCase ( modifier )) { // stop words
344
+ } else if ("ALIAS" . equals ( normalizedModifier ) || "CODEC" . equals ( normalizedModifier )
345
+ || "DEFAULT" . equals ( normalizedModifier ) || "MATERIALIZED" . equals ( normalizedModifier )
346
+ || "TTL" . equals ( normalizedModifier )) { // stop words
345
347
i = ClickHouseUtils .skipContentsUntil (args , i , len , ',' ) - 1 ;
346
348
break ;
347
349
} else {
348
350
if ((name == null || name .isEmpty ())
349
- && !ClickHouseDataType .mayStartWith (builder .toString ())) {
351
+ && !ClickHouseDataType .mayStartWith (builder .toString (), normalizedModifier )) {
350
352
return readColumn (args , i - modifier .length (), len , builder .toString (), list );
351
353
} else {
352
354
builder .append (' ' );
0 commit comments