Search before asking
Fluss version
0.9.0 (latest release)
Please describe the bug 🐞
The Rust LimitBatchScanner log path does not handle schema evolution when reading Arrow log batches.
decode_log_batch creates a single ArrowReadContext using the current table schema and uses it to decode every returned LogRecordBatch. However, each log batch carries its own schema_id and may have been written using an older schema.
As a result, after an ADD COLUMN, a limit scan that includes batches written before the schema change fails because the decoder expects the newly added Arrow field to exist in the old batch.
Steps to reproduce
- Create an Arrow log table with the following schema:
- Append and flush one or more records.
- Add a new column:
ALTER TABLE ... ADD COLUMN age BIGINT;
- Create a limit scanner using the latest table metadata.
- Scan a bucket containing records written before the schema change.
A minimal unit-level reproduction is to:
- Build an Arrow log batch using the old two-column schema.
- Call
decode_log_batch with a TableInfo containing the new three-column schema.
Solution
No response
Are you willing to submit a PR?
Search before asking
Fluss version
0.9.0 (latest release)
Please describe the bug 🐞
The Rust
LimitBatchScannerlog path does not handle schema evolution when reading Arrow log batches.decode_log_batchcreates a singleArrowReadContextusing the current table schema and uses it to decode every returnedLogRecordBatch. However, each log batch carries its ownschema_idand may have been written using an older schema.As a result, after an
ADD COLUMN, a limit scan that includes batches written before the schema change fails because the decoder expects the newly added Arrow field to exist in the old batch.Steps to reproduce
A minimal unit-level reproduction is to:
decode_log_batchwith aTableInfocontaining the new three-column schema.Solution
No response
Are you willing to submit a PR?