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

wip: Implement extract epoch #2786

Closed
wants to merge 1 commit into from
Closed

Conversation

mkmik
Copy link
Contributor

@mkmik mkmik commented Jun 24, 2022

Which issue does this PR close?

Closes #2785

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the physical-expr Physical Expressions label Jun 24, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #2786 (bec8956) into master (11ae737) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2786      +/-   ##
==========================================
- Coverage   85.15%   85.11%   -0.04%     
==========================================
  Files         273      273              
  Lines       48076    48096      +20     
==========================================
  Hits        40938    40938              
- Misses       7138     7158      +20     
Impacted Files Coverage Δ
...tafusion/physical-expr/src/datetime_expressions.rs 69.39% <0.00%> (-8.52%) ⬇️
datafusion/core/src/physical_plan/metrics/value.rs 86.93% <0.00%> (-0.51%) ⬇️
datafusion/expr/src/logical_plan/plan.rs 73.91% <0.00%> (+0.19%) ⬆️

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 11ae737...bec8956. Read the comment docs.

_ => Err(DataFusionError::Execution(format!(
"Date part '{}' not supported",
"Date partx '{}' not supported",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Date partx '{}' not supported",
"Date part '{}' not supported",

if array.is_null(i) {
b.append_null()?;
} else {
let scale = match unit {
Copy link
Contributor

Choose a reason for hiding this comment

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

T: ArrowTemporalType + ArrowNumericType,
i64: std::convert::From<T::Native>,
{
let mut b = Int32Builder::new(array.len());
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: In terms of performance (and readability), it is better to avoid the builder/value etc. and work directly on the values (check the arrow-rs kernels for examples).
Ok to leave this for a future PR if you like 👍

@alamb
Copy link
Contributor

alamb commented Jan 14, 2023

This PR is more than 6 month old, so closing it down for now to clean up the PR list. Please reopen if this is a mistake and you plan to work on it more

@alamb alamb closed this Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EXTRACT(EPOCH from column)
4 participants