Skip to content

Move ScalarValue tests alongside implementation, move from_slice to datafusion_core - #2914

Merged
alamb merged 1 commit into
apache:masterfrom
alamb:alamb/move_scalar_tests
Jul 15, 2022
Merged

alamb merged 1 commit into
apache:masterfrom
alamb:alamb/move_scalar_tests

Conversation

@alamb

@alamb alamb commented Jul 14, 2022

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #2913

Rationale for this change

I am working on #2891 and it was not clear there were existing ScalarValue tests because they were in a different module than their implementation

Implementation: https://github.com/apache/arrow-datafusion/blob/fd64e6f2e5ca5ba8c33c431b75a3ba9441091970/datafusion/common/src/scalar.rs
Tests https://github.com/apache/arrow-datafusion/blob/85ca8be669dc1fbba4b2eefbf99fc2ed1546cc0c/datafusion/core/src/scalar.rs

🤯

What changes are included in this PR?

  1. Move ScalarValue tests alongside implementation
  2. move from_slice to datafusion_core (as it is used in the ScalarValue implementation)

Are there any user-facing changes?

from_slice is now in the datafusion_core crate (used to be in datafusion_physical_expr crate), but their is a pub use so no existing code needs to be changed (they can still import from_slice from datafusion_physical_expr)

@github-actions github-actions Bot added core Core DataFusion crate physical-expr Changes to the physical-expr crates labels Jul 14, 2022

@alamb alamb left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Github makes this look like a massive diff, but it has only about 5 lines of substance

ScalarValue::TimestampNanosecond(r, None)
}
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

these tests are moved, verbatim. The only change is that this line

    use arrow::{array::*, datatypes::*};

was removed at the direction of the rust compiler as it was no longer used

@alamb
alamb marked this pull request as ready for review July 14, 2022 19:03
@alamb
alamb requested a review from andygrove July 14, 2022 19:04

@andygrove andygrove left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @alamb. The current state was likely a result of the recent refactoring of crates and modules.

@alamb

alamb commented Jul 14, 2022

Copy link
Copy Markdown
Contributor Author

cc @comphead this may affect #2893

Would you like me to wait for that to be ready to merge this PR?

@alamb

alamb commented Jul 15, 2022

Copy link
Copy Markdown
Contributor Author

@comphead I merged this PR to make progress on other PRs. I will be happy to help rebase #2893 if you have trouble after this.

@alamb
alamb merged commit d8a2f58 into apache:master Jul 15, 2022
@ursabot

ursabot commented Jul 15, 2022

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = fb2221c and contender = d8a2f58. d8a2f58 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/move_scalar_tests branch August 8, 2023 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move ScalarValue tests alongside implementation, move from_slice to core

3 participants