thswlsqls opened a new pull request, #16871: URL: https://github.com/apache/iceberg/pull/16871
Closes #10275 ## Summary - When a column is added with `ALTER TABLE ... ADD COLUMN` after data files were written, the arrow vectorized reader produces a constant `VectorHolder` whose vector is null. - `GenericArrowVectorAccessorFactory.getPlainVectorAccessor` called `vector.getClass()` on that null vector, throwing a confusing NullPointerException. - Guard the null vector so the message becomes `Unsupported vector: null`, matching the null-safe pattern already used by the `default` branch in the same class (line 178). - Revives the stale fix from #10284, closed by the stale bot (not rejected by design); adds the reproduction test the reviewer requested, with no Spark dependency. - Fully reading added constant/null columns in the vectorized path is out of scope here and tracked as follow-up on #10275. ## Testing done - Added `TestArrowReader#testReadAddedColumnFailsWithClearMessage`: writes one row, adds a column via `updateSchema().addColumn`, scans with `VectorizedTableScanIterable`, and asserts `UnsupportedOperationException` with message `Unsupported vector: null`. - Verified the test fails on `main` (NPE on `vector.getClass()`) and passes with the fix. - `./gradlew :iceberg-arrow:check` — passed (30 tests, JDK 21). -- 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]
