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

Add serialization of ScalarValue::IntervalMonthDayNano #3535

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Sep 19, 2022

draft as it builds on #3534

Which issue does this PR close?

Part of #3531

Rationale for this change

See #3531

What changes are included in this PR?

  1. Implement serialization code for: ScalarValue::IntervalMonthDayNano
  2. Add tests

Are there any user-facing changes?

No

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2022

Codecov Report

Merging #3535 (0a1fbee) into master (0a2b0a7) will decrease coverage by 0.00%.
The diff coverage is 86.56%.

@@            Coverage Diff             @@
##           master    #3535      +/-   ##
==========================================
- Coverage   85.92%   85.91%   -0.01%     
==========================================
  Files         301      300       -1     
  Lines       56249    56257       +8     
==========================================
+ Hits        48330    48332       +2     
- Misses       7919     7925       +6     
Impacted Files Coverage Δ
datafusion/core/src/execution/context.rs 79.31% <ø> (-0.03%) ⬇️
datafusion/proto/src/from_proto.rs 40.22% <27.27%> (+0.06%) ⬆️
datafusion/core/src/physical_plan/planner.rs 77.47% <90.90%> (+0.11%) ⬆️
datafusion/core/src/physical_plan/sorts/sort.rs 93.86% <100.00%> (-0.60%) ⬇️
datafusion/expr/src/binary_rule.rs 84.50% <100.00%> (-0.09%) ⬇️
datafusion/proto/src/lib.rs 94.38% <100.00%> (+0.09%) ⬆️
datafusion/proto/src/to_proto.rs 54.84% <100.00%> (+1.00%) ⬆️
datafusion/sql/src/planner.rs 81.25% <100.00%> (ø)
...e/src/physical_plan/sorts/sort_preserving_merge.rs 93.49% <0.00%> (-0.36%) ⬇️
... and 5 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@alamb alamb force-pushed the alamb/serialize_interval_mdn branch 2 times, most recently from 7bb0b9f to 81c0b54 Compare September 21, 2022 17:13
@@ -422,6 +425,23 @@ mod roundtrip_tests {
ScalarValue::TimestampSecond(Some(i64::MAX), None),
ScalarValue::TimestampSecond(Some(0), Some("UTC".to_string())),
ScalarValue::TimestampSecond(None, None),
ScalarValue::IntervalDayTime(Some(IntervalDayTimeType::make_value(0, 0))),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It appears there were no round trip tests for IntervalDayTime either, so I added them as well


message ScalarValue{
oneof value {
// Null value of any type (type is encoded)
PrimitiveScalarType null_value = 19;
Copy link
Contributor Author

@alamb alamb Sep 21, 2022

Choose a reason for hiding this comment

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

I really dislike PrimitiveScalarType and hope to remove it eventually

@alamb alamb marked this pull request as ready for review September 21, 2022 17:15
@alamb
Copy link
Contributor Author

alamb commented Sep 21, 2022

cc @waitingkuo and @avantgardnerio

@alamb alamb force-pushed the alamb/serialize_interval_mdn branch from 81c0b54 to 0a1fbee Compare September 21, 2022 17:58
Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @alamb

@andygrove andygrove merged commit 52ff7ca into apache:master Sep 22, 2022
@waitingkuo
Copy link
Contributor

LGTM thank you @alamb

@ursabot
Copy link

ursabot commented Sep 22, 2022

Benchmark runs are scheduled for baseline = 7033c0e and contender = 52ff7ca. 52ff7ca is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@alamb alamb deleted the alamb/serialize_interval_mdn branch September 23, 2022 10:15
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.

6 participants