Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: jsonwriter and recordbatchwriter to respect stats skipping #2989

Merged
merged 2 commits into from
Nov 23, 2024

Conversation

jusjosj
Copy link
Contributor

@jusjosj jusjosj commented Nov 12, 2024

Description

This is an update to JsonWriter and RecordBatchWriter to allow them to write commit log stats information in accordance with delta.dataSkippingNumIndexedCols and
delta.dataSkippingStatsColumns if present on the table. If these fields are unset, then the default behavior of collecting stats for the first 32 columns is preserved

Related Issue(s)

Tests

Tested by running all unit tests with cargo test as well as followed the instructions in CONTRIBUTING.md

@github-actions github-actions bot added the binding/rust Issues for the Rust crate label Nov 12, 2024
Copy link

ACTION NEEDED

delta-rs follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@jusjosj jusjosj changed the title Fix JsonWriter and RecordBatchWriter to respect stats skipping fix: JsonWriter and RecordBatchWriter to respect stats skipping Nov 12, 2024
@jusjosj jusjosj changed the title fix: JsonWriter and RecordBatchWriter to respect stats skipping fix: jsonwriter and recordbatchwriter to respect stats skipping Nov 12, 2024
@jusjosj jusjosj force-pushed the fix/stats-json-writer branch from 8e15603 to 1d3952e Compare November 12, 2024 22:54
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 90.39146% with 27 lines in your changes missing coverage. Please review.

Project coverage is 72.63%. Comparing base (68d57ef) to head (f5ad8ed).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/core/src/writer/record_batch.rs 81.60% 19 Missing and 4 partials ⚠️
crates/core/src/writer/json.rs 97.35% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2989      +/-   ##
==========================================
+ Coverage   72.44%   72.63%   +0.18%     
==========================================
  Files         128      128              
  Lines       40974    41199     +225     
  Branches    40974    41199     +225     
==========================================
+ Hits        29685    29924     +239     
+ Misses       9374     9350      -24     
- Partials     1915     1925      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@rtyler rtyler self-assigned this Nov 21, 2024
@rtyler rtyler added the bug Something isn't working label Nov 21, 2024
@rtyler rtyler added this to the v0.22 milestone Nov 21, 2024
@rtyler
Copy link
Member

rtyler commented Nov 22, 2024

I am making some modifications to this pull request to make the JsonWriter take a DeltaTable which already has these properties present through the table configuration. This will ensure consistent behavior with other writers, but requires a little refactoring on this under-appreciated code 😄

@jusjosj
Copy link
Contributor Author

jusjosj commented Nov 22, 2024

I am making some modifications to this pull request to make the JsonWriter take a DeltaTable which already has these properties present through the table configuration. This will ensure consistent behavior with other writers, but requires a little refactoring on this under-appreciated code 😄

Sounds good thanks! Also I'm using going to be using JsonWriter for a pretty intensive workload, so I'd be happy to chip-in for any improvements/maintenance it might need. If you have anything in mind, feel free to tag me here or on slack.

jjossick and others added 2 commits November 23, 2024 15:17
This is an update to JsonWriter and RecordBatchWriter to allow them to
write commit log stats information in accordance with
delta.dataSkippingNumIndexedCols and
delta.dataSkippingStatsColumns if present on the table.  If these fields
are unset, then the default behavior of collecting stats for the first 32
columns is preserved

Signed-off-by: Justin Jossick <[email protected]>
The JsonWriter was created before a lot of other code and was in a need
of a little refactor. The writer does not commit to the Delta table on
its own, which can be a benefit for some performance specific use-cases.
This change does however enforce that it must be initialized with a
valid Delta table path which will ensure it can use table configuration
properly

Signed-off-by: R. Tyler Croy <[email protected]>
@rtyler rtyler force-pushed the fix/stats-json-writer branch from bfd3220 to f5ad8ed Compare November 23, 2024 15:24
@rtyler rtyler enabled auto-merge November 23, 2024 15:24
@rtyler rtyler added this pull request to the merge queue Nov 23, 2024
Merged via the queue into delta-io:main with commit d82b9b3 Nov 23, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/rust Issues for the Rust crate bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JsonWriter does not respect delta.dataSkippingStatsColumns
4 participants