github-actions[bot] commented on code in PR #67166:
URL: https://github.com/apache/doris/pull/67166#discussion_r3912357211
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/NestedColumnPruning.java:
##########
@@ -662,7 +663,7 @@ public void setAccessByPath(List<String> path, int
accessIndex, ColumnAccessPath
accessPartialChild = true;
if (this.type.isStructType()) {
- String fieldName = path.get(accessIndex).toLowerCase();
+ String fieldName =
path.get(accessIndex).toLowerCase(Locale.ROOT);
Review Comment:
[P1] Keep cast pruning on the same ROOT-key identity
The surrounding access-tree lookups now use ROOT-lowercase keys, but
`replacePathByAnotherTree` still matches cast fields with `equalsIgnoreCase`.
Java treats `i`/dotless `ı` (and `σ`/final `ς`) as equal even though the new
`StructType` maps permit them as distinct ROOT keys. For `element_at(CAST(s AS
STRUCT<I:BIGINT, ı:BIGINT>), 'ı')`, the first field can therefore win and the
scan is pruned to `i`, leaving the requested sibling absent or reading the
wrong one. Please compare the canonical keys exactly in the cast remapper and
add a cast-plus-pruning regression for a ROOT-distinct sibling pair.
##########
fe/fe-type/src/main/java/org/apache/doris/catalog/StructType.java:
##########
@@ -122,15 +123,15 @@ public boolean supportSubType(Type subType) {
public void addField(StructField field) {
field.setPosition(fields.size());
fields.add(field);
- fieldMap.put(field.getName().toLowerCase(), field);
+ fieldMap.put(field.getName().toLowerCase(Locale.ROOT), field);
}
public ArrayList<StructField> getFields() {
return fields;
}
public StructField getField(String fieldName) {
- return fieldMap.get(fieldName.toLowerCase());
+ return fieldMap.get(fieldName.toLowerCase(Locale.ROOT));
Review Comment:
[P1] Preserve lookup for pre-ROOT serialized structs
This lookup now uses ROOT keys, but both `StructField.name` and
`StructType.fieldMap` are persisted. An older FE running under `tr-TR`
serialized `STRUCT<I:INT>` with the runtime name/key `ı`; after upgrade this
method looks for ROOT `i` and returns null, so a previously valid
`element_at(s, 'I')` fails. The fallback for missing `originalName` does not
repair either legacy runtime value. Please migrate/rebuild old serialized
struct maps and names (or provide a compatible legacy lookup), add a pre-change
Turkish JSON/image replay test, and define the old-FE rolling direction for
newly written ROOT keys.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]