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

Parquet Derive: remove obscure feature flags, make chrono time emit converted type #712

Merged
merged 5 commits into from
Aug 28, 2021

Conversation

xrl
Copy link
Contributor

@xrl xrl commented Aug 24, 2021

Which issue does this PR close?

Closes #711

Rationale for this change

I could not upgrade parquet-rs for my derive-heavy project.

What changes are included in this PR?

  • Remove obscure features which hide the useful tests
  • Add support for converted_type so we get TIMESTAMP_MILLIS

Are there any user-facing changes?

I have tested it on my code base and it works without changes. Users may want to remove the feature flags in the Cargo.toml.

@codecov-commenter
Copy link

Codecov Report

Merging #712 (55fdd4f) into master (8308615) will increase coverage by 0.00%.
The diff coverage is 48.27%.

❗ Current head 55fdd4f differs from pull request most recent head 7568e71. Consider uploading reports for the commit 7568e71 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master     #712   +/-   ##
=======================================
  Coverage   82.46%   82.47%           
=======================================
  Files         168      168           
  Lines       47419    47461   +42     
=======================================
+ Hits        39104    39143   +39     
- Misses       8315     8318    +3     
Impacted Files Coverage Δ
parquet_derive/src/parquet_field.rs 68.86% <44.44%> (+2.69%) ⬆️
parquet_derive_test/src/lib.rs 100.00% <100.00%> (ø)
arrow/src/array/equal_json.rs 84.92% <0.00%> (-0.29%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8308615...7568e71. Read the comment docs.

@xrl
Copy link
Contributor Author

xrl commented Aug 25, 2021

@nevi-me it seems like you've taken to proc macro hacking in here. perhaps this is something you could review?

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me 👍 . Thank you @xrl

Since this PR is removing some feature flags, I think strictly speaking it is not backwards compatible (and thus we wouldn't backport to the 5.3 release (planned for next week) and instead include it in the 6.0 release (planned for a few months from now). Depending on your timeframe if you want to split this PR up so the feature flag removal is done in a separate PR we could get it into 5.3 I think

@@ -534,13 +545,23 @@ impl Type {
})) }
}
"NaiveDate" => quote! { Some(LogicalType::DATE(Default::default())) },
"NaiveDateTime" => quote! { None },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double checked and I agree there does not seem to be any DATETIME logical type in https://sourcegraph.com/github.com/apache/arrow-rs/-/blob/parquet/src/basic.rs?L166

@alamb alamb merged commit 0e7c4c5 into apache:master Aug 28, 2021
@alamb
Copy link
Contributor

alamb commented Aug 28, 2021

@xrl let me know if it would be helpful to try and backport this into the arrow 5.x releases (e.g. arrow 5.4.0 )

@xrl
Copy link
Contributor Author

xrl commented Sep 1, 2021

@alamb thanks for the merge! I was just coming back to tackle a split up. I would love to get this core functionality in to 5.x. How can I help do that? I can prepare a PR for it.

@xrl xrl deleted the timestamp-millis-converted-type branch September 1, 2021 04:06
alamb pushed a commit that referenced this pull request Sep 9, 2021
@alamb
Copy link
Contributor

alamb commented Sep 9, 2021

Hi @xrl -- sorry for the delay in responding -- I was on vacation and am now catching back up.

I made a cherry-pick PR without the feature flag changes here: #757

Any chance you can give it a look?

alamb pushed a commit that referenced this pull request Sep 9, 2021
alamb added a commit that referenced this pull request Sep 9, 2021
* Parquet Derive: make chrono time emit converted type (#712)

* NaiveDateTime emits converted type

* restore over-zealously removed chrono dependency

Co-authored-by: Xavier Lange <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parquet_derive does not support chrono time values
3 participants