[regression] simplify iceberg table cache schema-change checks#61066
[regression] simplify iceberg table cache schema-change checks#61066xylaaaaa wants to merge 2 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
Simplifies the Iceberg external table cache regression test by reducing the number of schema-evolution scenarios executed via Spark, aiming to keep representative cache-behavior coverage while lowering external-call cost in externregression.
Changes:
- Removed schema-change subcases for external
ADD COLUMNandDROP COLUMN. - Kept schema-change coverage for external
RENAME COLUMNandALTER COLUMN TYPEwith cache vs no-cache verification.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Test 2.2: ALTER COLUMN TYPE | ||
| logger.info("--- Test 2.2: External ALTER COLUMN TYPE ---") | ||
| spark_iceberg "DROP TABLE IF EXISTS demo.${testDb}.test_alter_type" | ||
| spark_iceberg "CREATE TABLE demo.${testDb}.test_alter_type (id INT, value INT) USING iceberg" | ||
| spark_iceberg "INSERT INTO demo.${testDb}.test_alter_type VALUES (1, 100)" |
There was a problem hiding this comment.
In the ALTER COLUMN TYPE test, the cached-schema assertion uses contains("int"), but the expected new type bigint also contains the substring int. This can make the test pass even if the cache is already refreshed (or not caching). Use an exact comparison (e.g., equalsIgnoreCase("int")) or explicitly assert that the type is not bigint for the cached/no-refresh case (and similarly tighten the initial schema check if you want it to fail fast).
|
run buildall |
Summary
test_iceberg_table_cacheADD COLUMN,RENAME COLUMN,ALTER COLUMN TYPEDROP COLUMNsubcase to reduce heavy external Spark callsWhy
Impact
spark_icebergcalls reduced from 48 to about 44 in this caseTest