JingsongLi commented on code in PR #11312:
URL: https://github.com/apache/paimon/pull/11312#discussion_r4662747060
##########
paimon-common/src/main/java/org/apache/paimon/casting/StringToArrayCastRule.java:
##########
@@ -116,7 +119,7 @@ private List<Object> parseArrayElements(
String value = token.value();
// only an unquoted null is the null element; "null" is the
four-character string
Object element =
- !token.literal() && "null".equals(value)
+ !token.literal() && "null".equalsIgnoreCase(value)
Review Comment:
**[P1] Preserve the meaning of defaults already stored in table schemas.** I
used the base runtime to set `[NULL]` as the `ARRAY<STRING>` default with
`SchemaChange.updateColumnDefaultValue` and write an omitted column. The stored
row contains the four-character string `NULL`. I opened the same table under
this revision and wrote another omitted column without changing the schema. The
new row contains a SQL null element, while the old row still contains the
string. During a writer rollout, the same persisted default can now produce two
values. Please normalize SQL NULL tokens when converting new SQL defaults to
metadata, or version the persisted literal grammar so existing schemas keep
their meaning. The map and row token changes need the same compatibility 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]