xiangfu0 commented on code in PR #18831:
URL: https://github.com/apache/pinot/pull/18831#discussion_r3466984896
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/defaultcolumn/BaseDefaultColumnHandler.java:
##########
@@ -339,10 +339,10 @@ Map<String, DefaultColumnAction>
computeDefaultColumnActionMap() {
}
// Compute REMOVE actions.
+ boolean reclaimDeletedColumns =
_indexLoadingConfig.isReclaimDeletedColumnsOnReload();
for (ColumnMetadata columnMetadata :
_segmentMetadata.getColumnMetadataMap().values()) {
String column = columnMetadata.getColumnName();
- // Only remove auto-generated columns
- if (!_schema.hasColumn(column) && columnMetadata.isAutoGenerated()) {
+ if (!_schema.hasColumn(column) && (columnMetadata.isAutoGenerated() ||
reclaimDeletedColumns)) {
Review Comment:
When `reclaimDeletedColumnsOnReload=true`, this now reclaims every column
missing from the schema, not just auto-generated default columns. That also
matches live synthetic columns such as OPEN_STRUCT materialized children
(`payload$key`, `payload$__sparse__`), which are intentionally not schema
fields but are still required by the standard column-loading path. A reload on
a table with OPEN_STRUCT columns would therefore physically delete still-live
child indexes/data. Please exclude synthetic/materialized child columns from
this reclaim path (for example via the existing parent-column metadata /
OPEN_STRUCT naming) and add a reload test for it.
--
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]