Expand description
Specification for a view partition backed by a SQL query on the lakehouse.
Structs§
- SqlPartition
Spec - A
PartitionSpecimplementation for SQL-defined partitions.
Functions§
- fetch_
sql_ partition_ spec - Fetches a
SqlPartitionSpecby executing a count query and an extract query.sort_orderdeclares the ordering the resulting partition’s rows are guaranteed to satisfy (seeSqlBatchView::with_merge_sort_order); passNonefor views that make no such guarantee. - plan_
sorted_ extract - Applies
sort_order(if declared) todfas aDataFrame::sortover itsScanSortColumns, builds the physical plan, and – only when a sort order was declared – runsassert_single_partitionandassert_ordering_satisfiedagainst it, mirroringQueryMerger::execute_sorted_merge‘s apply-then-plan sequence (merge.rs:227-270; its four merge-specific optimizer settings have no counterpart here). Withsort_order: Nonethe plan is built unsorted and neither assertion runs.subjectnames the query for the assertions’ error messages (e.g.format!("extract query for {view}"));insert_rangeis the range being written. Returns the physical plan and theTaskContextthe caller needs to execute it – callers are left toexecute_streamit themselves, since only they know what to do with the resulting stream.