You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: Investigate caching opportunities in iceberg_scan.rs #3602
This might be a future optimization if I'm understanding control flow correctly, but for default value/schema change columns we're allocating new ArrayRef every time. It seems like there are caching opportunities here. Maybe file an issue to optimize default value/identity columns/schema change columns in the expression adapter.
Investigated this with instrumentation in adapt_batch_with_expressions. After logging all projection expressions across the full CometIcebergNativeSuite (including schema evolution, partitioned tables, MOR, and complex types), every expression is either a column reference (name@N) or a cast wrapping a column reference (Cast [child: name@N] / COMET_CAST_COLUMN(name@N AS ...)). No literal expressions appeared.
The two scenarios where we expected literals:
Partition columns — iceberg-rust's RecordBatchTransformer injects identity partition values into the batch as data columns before it reaches us.
Schema evolution (missing columns) — iceberg-rust's RecordBatchTransformer adds missing columns filled with nulls. In the "schema evolution - add column" test, old files written with (id, name) arrive with file_schema=["id", "name", "age"] already populated — the adapter just sees age@2.
Since iceberg-rust handles both cases internally, our adapter never produces literal expressions, and there's nothing to cache. Closing as not applicable.
Activity
mbutrovich commentedon Mar 3, 2026
Investigated this with instrumentation in
adapt_batch_with_expressions. After logging all projection expressions across the fullCometIcebergNativeSuite(including schema evolution, partitioned tables, MOR, and complex types), every expression is either a column reference (name@N) or a cast wrapping a column reference (Cast [child: name@N]/COMET_CAST_COLUMN(name@N AS ...)). No literal expressions appeared.The two scenarios where we expected literals:
RecordBatchTransformeradds missing columns filled with nulls. In the "schema evolution - add column" test, old files written with (id, name) arrive withfile_schema=["id", "name", "age"]already populated — the adapter just seesage@2.Since iceberg-rust handles both cases internally, our adapter never produces literal expressions, and there's nothing to cache. Closing as not applicable.