Skip to content

Commit 7831f75

Browse files
committed
Use the merged base edition API in the layout benchmark writer
CI run 38936290519 failed before timing: rewrite_list_layout still called WriteStrategyBuilder::with_list_layout(), removed by upstream #10563 and inherited through the merged #10540 base. Keep the base's edition-driven writer policy and adapt the benchmark helper instead of restoring the API. Enable the experimental list edition only for list/list-elements modes. Flat mode leaves it disabled, preserving the flat control. Drop the obsolete environment guard and explicit writer toggle. Scanner runtime is unchanged, so the completed local 48-case merged-comparison remains applicable. Validation: built both release_debug examples with --locked; rewrote all 1,000,000 rows in flat, list, list-elements/1 MiB and list-elements/64 KiB modes; all four full Arrow equality and layout-kind checks passed, as did four V2 selection comparisons against full V1 scans followed by take. Pinned formatting and diff whitespace checks passed. No new Rust-library checks were needed for this example-only API adaptation. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 02119f6 commit 7831f75

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

‎vortex/examples/rewrite_list_layout.rs‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,18 @@ async fn main() -> Result<()> {
7272
matches!(args[2].as_str(), "flat" | "list" | "list-elements"),
7373
"Unknown layout"
7474
);
75-
ensure!(
76-
std::env::var("VORTEX_EXPERIMENTAL_LIST_LAYOUT").as_deref() != Ok("1"),
77-
"Unset VORTEX_EXPERIMENTAL_LIST_LAYOUT so the flat control stays flat"
78-
);
7975
let target_bytes = args.get(3).map(|value| value.parse::<u64>()).transpose()?;
8076
ensure!(target_bytes != Some(0), "TARGET_BYTES must be positive");
8177
let session = VortexSession::default().with_tokio();
8278
session.register_edition(&EXPERIMENT_EDITION)?;
83-
session.enable_edition(EXPERIMENT_EDITION.edition.id)?;
79+
if args[2] != "flat" {
80+
session.enable_edition(EXPERIMENT_EDITION.edition.id)?;
81+
}
8482
let input = session
8583
.open_options()
8684
.open_path(Path::new(&args[0]))
8785
.await?;
8886
let mut strategy = WriteStrategyBuilder::from_session(&session);
89-
if args[2] == "list" {
90-
strategy = strategy.with_list_layout();
91-
}
9287
if let Some(target_bytes) = target_bytes {
9388
strategy = strategy.with_data_block_target_bytes(Some(target_bytes));
9489
}

0 commit comments

Comments
 (0)