Skip to content
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
66012dd
Move segment sources into vortex-io
gatesn Nov 19, 2026
a11813a
Name scan reads by source and segment
gatesn Nov 19, 2026
578ae10
Let any data source hand engines a planner-driven scan
gatesn Nov 19, 2026
675cedc
Bind V2 scan expressions once, in the file's data source
gatesn Nov 19, 2026
4c72a7d
Keep engines' own V2 drivers and drop Partition::plan
gatesn Nov 19, 2026
d55e682
Scan Vortex files on V2 through data_source
gatesn Nov 19, 2026
0d1e5d1
Run multi-file Scan API partitions on V2
gatesn Nov 19, 2026
5a061e4
Split planned scans into row-range partitions
gatesn Nov 19, 2026
56c3f00
Rename the V2 Scan API sources and let engines ask for partitions
gatesn Nov 19, 2026
32fed9c
Add a datafusion-bench flag for the Scan API table path
gatesn Nov 19, 2026
d0aa278
Scan Vortex files on the V2 scan through the Scan API
gatesn Nov 19, 2026
70ae02b
Split V2 Scan API scans into row-range partitions
gatesn Nov 19, 2026
16e95fd
Describe the row-range split's 65,536-row cap accurately
gatesn Nov 19, 2026
f6a5337
Stack the union layer on the target_partitions layer
gatesn Nov 19, 2026
2a14cbb
Name scan reads by source and segment
gatesn Nov 19, 2026
79f2b69
Add a datafusion-bench flag for the Scan API table path
gatesn Nov 19, 2026
cbdf115
Scan Vortex files on the V2 scan through the Scan API
gatesn Nov 19, 2026
d0fbe75
Split V2 Scan API scans into row-range partitions
gatesn Nov 19, 2026
90c086c
Merge the rebased ngates/scan-io-segment-requests
gatesn Nov 19, 2026
ea80bf1
Stack the union layer on the rebased target_partitions layer
gatesn Nov 19, 2026
4a5d59c
Expose a file's layout-reader Scan API source on its own
gatesn Nov 19, 2026
665b003
Merge ngates/plan-data-source
gatesn Nov 19, 2026
e913061
Merge ngates/scan-request-target-partitions
gatesn Nov 19, 2026
464d861
Run the Scan API tables on the V2 scan with --scan-v1 false
gatesn Nov 20, 2026
84245a6
Merge the V2 Scan API table path onto ngates/v2-scan-pool
gatesn Nov 20, 2026
c0a80df
Drop the unused DataSource import
gatesn Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions benchmarks/datafusion-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ use vortex::file::multi::MultiFileDataSource;
use vortex::io::filesystem::FileSystemRef;
use vortex::io::object_store::ObjectStoreFileSystem;
use vortex::io::session::RuntimeSessionExt;
use vortex::scan::DataSource as _;
use vortex::scan::DataSourceRef;
use vortex_arrow::ArrowSessionExt;
use vortex_bench::Benchmark;
Expand Down Expand Up @@ -252,6 +251,8 @@ async fn main() -> anyhow::Result<()> {
Ok(())
}

/// Whether `VORTEX_USE_SCAN_API=1` asks to register Vortex tables through the Scan API rather
/// than a listing table. `--scan-v1` still picks the scan the tables run on.
fn use_scan_api() -> bool {
std::env::var("VORTEX_USE_SCAN_API").is_ok_and(|v| v == "1")
}
Expand All @@ -262,9 +263,8 @@ async fn register_benchmark_tables<B: Benchmark + ?Sized>(
format: Format,
scan_v2: bool,
) -> anyhow::Result<()> {
if !scan_v2 && use_scan_api() && matches!(format, Format::OnDiskVortex | Format::VortexCompact)
{
register_v2_tables(session, benchmark, format).await
if use_scan_api() && matches!(format, Format::OnDiskVortex | Format::VortexCompact) {
register_scan_api_tables(session, benchmark, format, scan_v2).await
} else {
let benchmark_base = benchmark.data_url().join(&format!("{}/", format.name()))?;
let file_format = format_to_df_format(format, scan_v2)?;
Expand Down Expand Up @@ -300,11 +300,16 @@ async fn register_benchmark_tables<B: Benchmark + ?Sized>(
}
}

/// Register tables using the V2 `VortexTable` + `MultiFileDataSource` path.
async fn register_v2_tables<B: Benchmark + ?Sized>(
/// Register tables through the Scan API: a `VortexTable` over a `MultiFileDataSource`.
///
/// With `scan_v2`, the table scans its files on the planner-driven scan through
/// [`MultiFileDataSource::build_plan`], whose files open as the scan reaches them. Otherwise it
/// scans them on layout readers through [`MultiFileDataSource::build`].
async fn register_scan_api_tables<B: Benchmark + ?Sized>(
session: &SessionContext,
benchmark: &B,
format: Format,
scan_v2: bool,
) -> anyhow::Result<()> {
let benchmark_base = benchmark.data_url().join(&format!("{}/", format.name()))?;

Expand All @@ -328,13 +333,14 @@ async fn register_v2_tables<B: Benchmark + ?Sized>(
None => format!("*.{}", format.ext()),
};

let multi_ds = MultiFileDataSource::new(SESSION.clone())
.with_glob(glob_pattern, Some(fs))
.build()
.await?;
let builder = MultiFileDataSource::new(SESSION.clone()).with_glob(glob_pattern, Some(fs));
let data_source: DataSourceRef = if scan_v2 {
builder.build_plan().await?
} else {
Arc::new(builder.build().await?)
};

let arrow_schema = Arc::new(SESSION.arrow().to_arrow_schema(multi_ds.dtype())?);
let data_source: DataSourceRef = Arc::new(multi_ds);
let arrow_schema = Arc::new(SESSION.arrow().to_arrow_schema(data_source.dtype())?);

let table_provider = Arc::new(VortexTable::new(data_source, SESSION.clone(), arrow_schema));
session.register_table(table.name, table_provider)?;
Expand Down
Loading