Gabriel39 commented on code in PR #66244:
URL: https://github.com/apache/doris/pull/66244#discussion_r3679394034
##########
fe/be-java-extensions/paimon-scanner/src/main/java/org/apache/doris/paimon/PaimonColumnValue.java:
##########
@@ -70,7 +81,7 @@ public void setOffsetRow(InternalRow record) {
}
public void setTimeZone(String timeZone) {
- this.timeZone = timeZone;
+ this.timeZone = ZoneId.of(timeZone);
Review Comment:
Fixed in 4459f2e9749. The scanner now resolves zones with the same short-ID
alias set as Doris FE and explicitly preserves `CST -> Asia/Shanghai`. Added an
INT-only scanner construction test with `EST` plus an LTZ conversion assertion
for Doris CST semantics.
##########
fe/be-java-extensions/paimon-scanner/src/main/java/org/apache/doris/paimon/PaimonColumnValue.java:
##########
@@ -200,9 +219,39 @@ public void unpackStruct(List<Integer> structFieldIndex,
List<ColumnValue> value
RowType rowType = (RowType) dataType;
// Projection entries are original child indexes, so the binary row
must keep the full RowType arity.
InternalRow row = record.getRow(idx, rowType.getFieldCount());
+ if (structValues == null) {
+ structValues = new ArrayList<>();
+ }
for (int i : structFieldIndex) {
- values.add(new PaimonColumnValue(row, i,
dorisType.getChildTypes().get(i),
- rowType.getFields().get(i).type(), timeZone));
+ values.add(reuseColumnValue(structValues, i, row, i,
dorisType.getChildTypes().get(i),
+ rowType.getFields().get(i).type()));
+ }
+ }
+
+ private PaimonColumnValue reuseColumnValue(
+ List<PaimonColumnValue> cache, int cacheIndex, DataGetters
childRecord, int childIndex,
+ ColumnType childDorisType, DataType childPaimonType) {
+ while (cache.size() <= cacheIndex) {
+ cache.add(null);
Review Comment:
Fixed in 4459f2e9749. Array/map caches now trim entries beyond the current
container size, and null complex values release all descendant caches. The new
shifting-shape test uses `ARRAY<ARRAY<INT>>` with N=4/M=32 and exercises both
shrink and null: retained wrappers stay at N+M=36 instead of growing from 36 to
68 and toward N+N*M as the large child moves.
--
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]