Skip to content

python-v1.7.0: Faster merges, parallel writes, catalog-managed commits

Latest

Choose a tag to compare

@ion-elgreco ion-elgreco released this 22 Nov 23:02
· 0 commits to main since this release

Highlights

Performance

Merge

  • Streamed merges prune target files at runtime with statistics collected from the source, by @ion-elgreco in #4790, #4796
  • A roaring bitmap per file tracks duplicate matches: up to 34% lower peak memory and 7.6% less time on TPC-DS inventory SF10, by @ion-elgreco in #4799
  • Merge index buffers are allocated on demand: 1.9x faster and 58% lower peak memory when the input spans 10k target files, by @fvaleye in #5060
  • A conditional when_not_matched_by_source clause no longer forces a full table scan, by @coderfender in #4901

Write

  • The writer encodes leaf columns in parallel: about 43% faster on unpartitioned tables and up to 28% faster on partitioned tables, by @ion-elgreco in #4818

Read and scan

  • DataFusion scans spread files over all target partitions. Before, a table with fewer than 65,536 files was read in one partition, by @FrankPortman in #4933
  • Scan planning keeps no per-file column statistics when there is no predicate, and uses up to 20% less peak memory when there is one, by @coderfender in #4823 and @fvaleye in #5029, #5031
  • Scans of tables partitioned by string or binary columns are faster and allocate up to half as much memory, by @fvaleye in #5099
  • A snapshot update that finds no new commits skips the _last_checkpoint read, by @fvaleye in #5101

Optimize

Python

  • DeltaTable.history() reads commit files only as you consume them, by @richacode007-byte in #4797
  • DeltaTable.partitions() no longer builds an add action per file, by @fvaleye in #5059
  • is_deltatable, restore, repair, generate, load_cdf, and the alter.set_table_* methods release the GIL while they wait on storage, by @darshil929 in #5005

Breaking changes

  • DeltaTable.history() returns an iterator, not a list. Change dt.history(1)[0] to next(dt.history(1)), and dt.history() to list(dt.history()), by @richacode007-byte in #4797
  • update and merge raise an error when an assignment names an unknown column. Before, the assignment was dropped silently, by @ion-elgreco in #5053
  • Writes reject lossy float to integer casts. Before, 2.9 was silently truncated to 2, by @rtyler in #4816
  • WriterProperties defaults changed, by @corwinjoy in #4877
    • Without compression, files keep the default of the operation (SNAPPY, or ZSTD(4) for optimize). Before, they were uncompressed.
    • Without statistics_truncate_length, the parquet default truncation applies.
    • delete writes SNAPPY files by default, not ZSTD(3).

Behavior changes

  • A naive datetime in update(new_values=...) is read as UTC, not as local time, by @wislertt in #4882
  • restore accepts a naive datetime and reads it as UTC, by @Rodrigo-Palma in #4793
  • TIMESTAMP partition values are written as UTC with an explicit offset, for example 2024-01-01T12:00:00.000000Z. This also changes the partition directory names of new files, by @Shahzeb-DataEngineer in #4866
  • Time travel by timestamp uses in-commit timestamps on tables that enable them, by @maharanay22 in #4897
  • DeltaTable.count() subtracts the rows that deletion vectors remove. get_add_actions() has a new deletion_vector column on tables with that feature, by @maharanay22 in #4850
  • to_pyarrow_dataset() raises an error on column mapped tables. Before, reader version 2 tables returned nulls. Use engine="datafusion" for these tables, by @FrankPortman in #4927 and @dgokeeffe in #5096
  • INT96 timestamps are read as microseconds. Values outside the years 1677 to 2262 no longer wrap, by @maharanay22 in #4841, #4856
  • The table property delta-rs.checkpoint.useRunLengthEncoding is deprecated. It has no effect and now logs a warning, by @ahlag in #4908

Other changes

  • feat(python): expose Delta table property constants by @jx2lee in #4737
  • fix(python): reject NaN bloom filter probabilities by @jx2lee in #4773
  • test: renable structs stats test by @ion-elgreco in #4776
  • fix: optimize keep default scan schema by @ion-elgreco in #4777
  • test: add regression test for delete by @ion-elgreco in #4769
  • fix: conflict when a concurrent commit enables a new table feature by @Rodrigo-Palma in #4778
  • fix(python): align gzip compression levels with parquet by @jx2lee in #4779
  • chore: update docs by @ion-elgreco in #4768
  • fix(ci): make the awaiting-feedback label removal step work by @glaziermag in #4780
  • fix: cdf merge regression by @ion-elgreco in #4785
  • fix(python): allow None writer properties in write overloads by @jx2lee in #4786
  • fix: file count lost when child nodes are replaced by @ion-elgreco in #4788
  • chore: bump all Rust crate versions to 2.0.0 by @rtyler in #4789
  • fix(python): fix copy_file keyword args by @jx2lee in #4791
  • refactor: scope log store writes per operation and introduce committer trait by @ion-elgreco in #4710
  • docs: add the 1.0.0 changelog details to the tree by @rtyler in #4807
  • refactor: apply deletion vectors by physical row position by @ethan-tyler in #4703
  • chore: use sccache more efficiently in CI by @adamreeve in #4795
  • fix(python): escape string literals in update new_values by @jx2lee in #4792
  • chore: update CODEOWNERS to reflect last year of contributions by @rtyler in #4808
  • refactor: datafile writer modules by @ion-elgreco in #4812
  • fix(python): resolve nested null types against matching field by @jx2lee in #4813
  • fix: keep the sign out of the fraction when serializing negative decimals by @breken-ai in #4814
  • fix: apply the scale when formatting decimal literals in fmt_expr_to_sql by @jx2lee in #4825
  • fix(python, rust): clean warn message during make check by @jx2lee in #4822
  • fix: annotate validations type to sidestep macOS trait solver overflow by @rtyler in #4828
  • fix(core): support reading and writing tables with the checkpointProtection feature by @rtyler in #4817
  • chore: upgrade opentelemetry crates by @rtyler in #4831
  • docs: explain how to configure deletedFileRetentionDuration by @Shahzeb-DataEngineer in #4832
  • chore: use an older version of Maven to fix the HDFS tests hanging by @adamreeve in #4834
  • fix(core): mark new columns nullable when merging schemas on write by @Shahzeb-DataEngineer in #4833
  • ci: drop the numpy 1.26.4 pin from the pyspark dependency group by @maharanay22 in #4847
  • test(python): fix Windows unit test portability by @xieofxie in #4860
  • fix(core): don't add the unused variantType feature at reader version 3 by @ahlag in #4836
  • fix: keep deletion vector files referenced by active files during full vacuum by @maharanay22 in #4839
  • chore(deps): upgrade opendal to 0.58 by @rtyler in #4868
  • fix: bump required rust version to 1.95.0 by @adamreeve in #4872
  • feat(read): catalog managed commits by @hntd187 in #4809
  • fix: propagate parquet metadata hints down to DF reads by @rtyler in #4870
  • refactor: consolidate writer properties into DeltaWriterProperties by @corwinjoy in #4837
  • fix: compute correct stats columns when skipping a struct typed column by @adamreeve in #4879
  • fix(catalog-unity): accept null expiration_time in temporary credentials by @jx2lee in #4884
  • fix(catalog-unity): tolerate unknown enum values in table responses by @jx2lee in #4885
  • fix: only treat partition predicates as exact when kernel evaluates them exactly by @maharanay22 in #4881
  • test: prove first execution succeeds after reset_state by @laverem in #4530
  • feat(python): expose parquet writer version in WriterProperties by @berserk-fan in #4903
  • chore: pin cc to 1.8.0 to unbreak Windows CI builds by @rtyler in #4913
  • docs(kernel): document spawn_blocking_with_span by @rtyler in #4900
  • fix(core): keep unmatched rows' struct values when merge widens a struct by @ahlag in #4889
  • docs: add multiple conditional clauses examples to merge docs by @Shahzeb-DataEngineer in #4890
  • fix: match optimize file selection ids for partition values containing "~" by @jx2lee in #4919
  • fix: mark failing test with a pyarrow dependency by @rtyler in #4921
  • fix: recognize v2Checkpoint in Python protocol checks by @turkeyleg in #4888
  • fix(core): allow safe_cast when merge widens a struct by @ahlag in #4917
  • feat(writer): composable per-file writer properties layers by @corwinjoy in #4876
  • chore: enable the sccache wrapper for cargo-llvm-cov by @rtyler in #4920
  • fix(catalog-unity): recognize variant column type by @getChan in #4923
  • feat(python): add a datafusion engine to the dataframe read methods by @FrankPortman in #4676
  • feat: add the executor crate with verbatim copies of delta-kernel-rs by @ion-elgreco in #4931
  • test: add windows test to workflow by @xieofxie in #4873
  • fix: treat the files optimize removes as the files it read by @Hien-Trinh in #4852
  • refactor: move core's DataFusion handlers and expression conversion by @ion-elgreco in #4932
  • fix(core): add timestampNtz feature for timestamps inside maps by @ahlag in #4937
  • refactor: move the upstream expression executor copies and merge by @ion-elgreco in #4938
  • chore: bump uv because of security incident by @ion-elgreco in #4952
  • fix: limit cdf deletion vector selections to each row group by @maharanay22 in #4949
  • fix(core): keep timestamp statistics for pre-epoch nanosecond values by @Shahzeb-DataEngineer in #4942
  • fix(core): decode local table roots in file uris by @WaterWhisperer in #4971
  • fix(mount): preserve literal percent escapes during rename by @WaterWhisperer in #4976
  • chore: fix clippy warnings by @WaterWhisperer in #4994
  • fix: keep legacy implied features when upgrading to table features by @maharanay22 in #4945
  • chore: add Copilot code review instructions by @rtyler in #4998
  • docs: remove outdated roadmap references by @WaterWhisperer in #5000
  • fix(core): avoid stack overflow on large literal in-list predicates by @grovermind in #4996
  • fix: explain timestamp_ntz to timestamp mismatch on write instead of asking for table features by @maharanay22 in #4854
  • fix: use directed rounding for decimal min/max statistics by @maharanay22 in #4895
  • fix: avoid stack overflow on long and/or predicate chains by @grovermind in #5003
  • fix(core): round up the timestamp max in pruning statistics by @swanandx in #4968
  • chore(ci): remove DCO check workflow by @rtyler in #5002
  • fix: conflict when an append races add_constraint by @maharanay22 in #5019
  • fix: name the check that refused a write in the validation error by @Shahzeb-DataEngineer in #5004
  • perf: borrow row-group metadata when collecting stats by @fvaleye in #5033
  • fix: conflict on removes with dataChange=false in the delete/delete check by @Hien-Trinh in #4943
  • chore: upgrade to buoyant_kernel the 0.30.1 release candidate by @rtyler in #5014
  • ci: key the python benchmark cache per run so its baseline advances by @glaziermag in #5036
  • feat: add windows arm64 package by @xieofxie in #4939
  • chore: upgrade to the released buoyant_kernel 0.30.1 by @rtyler in #5040
  • fix(core): coerce literals again after a predicate is simplified by @tanvir-ux in #4973
  • fix: honor assignments to a column a schema-evolving merge adds by @maharanay22 in #5027
  • docs: idempotent writes with application transactions by @desusaiteja in #5043
  • feat(core)!: mark all public enums #[non_exhaustive] by @rtyler in #4929
  • docs: document DELTARS_* writer and vacuum environment variables by @Shahzeb-DataEngineer in #4966
  • perf(python): return arrow view types from the datafusion engine by @fvaleye in #5032
  • fix(core): correct pruning statistics in LogDataHandler by @swanandx in #5016
  • fix: read change data files under escaped partition directories by @maharanay22 in #4843
  • fix: keep one copy of a target row matched twice in a not-matched-by-source merge by @maharanay22 in #5025
  • fix(core): honour max_row_group_bytes in the parallel writer by @berserk-fan in #4912
  • feat: fill the executor's gaps: object-store I/O, file scans by @ion-elgreco in #4951
  • chore(ci): drop warn-only clippy steps, run unit tests under cargo-nextest by @rtyler in #4935
  • fix: honor limits in metadata-only scans by @WaterWhisperer in #5015
  • docs: clarify generated column and constraint semantics by @WaterWhisperer in #5020
  • chore(deps): update rstest to 0.28 and cc to 1.10 by @rtyler in #5038
  • test: bump dat to latest 0.0.8 by @ion-elgreco in #5057
  • fix: read live rows for unpaired cdf actions with deletion vectors by @maharanay22 in #4947
  • chore(ci): update cargo-llvm-cov to 0.9.1 by @fvaleye in #5076
  • chore(ci): temporarily disable sccache on windows by @fvaleye in #5081
  • perf(python): borrow schemas and fields for arrow conversion by @fvaleye in #5061
  • fix(core): avoid stack overflow in merge with many distinct partition values by @SAMARTHJAISWAL in #5075
  • fix(kernel-executor): skip vendored protoc on FreeBSD by @rtyler in #5082
  • chore(deps): batch dependabot updates (syn, cc, brotli, sqlparser) by @rtyler in #5080
  • test(core): introduce deterministic simulation testing for concurrent commits by @vishalkotak in #5067
  • perf: format modification time errors lazily by @fvaleye in #5089
  • perf: cache file view field indexes by @fvaleye in #5091
  • perf: clone only selected conflict actions by @fvaleye in #5088
  • refactor: borrow nested statistics path parts by @fvaleye in #5092
  • refactor: reuse the binary partition encoder when pruning by @fvaleye in #5090
  • fix(core): match dataSkippingStatsColumns against full column paths by @fvaleye in #5093
  • feat: catalog managed commits writing by @hntd187 in #4886
  • ci: use uv run --no-sync in python_benchmark to time the ci-profile build by @glaziermag in #5103
  • fix: don't add unused writer features in set_table_properties by @Tabish0007 in #5023
  • chore: remove duplicate interval parser by @fvaleye in #5104
  • chore: remove unused error variants and test helpers by @fvaleye in #5102
  • chore: remove unused log schema fields by @fvaleye in #5100
  • feat: updating nested fields in merge and update by @ion-elgreco in #5056
  • feat: use unitycatalog-rs for integration by @ion-elgreco in #5108

New Contributors

Full Changelog: python-v1.6.6...python-v1.7.0