Skip to content

Conversation

@Dandandan
Copy link
Contributor

@Dandandan Dandandan commented Jan 30, 2021

This adds year support to the temporal module. Year support is something needed for some TCPH queries.
Together with extract support
#9359

we should be able to add EXTRACT (YEAR FROM dt) support to DataFusion.

Other changes in the PR:

  • Adding some more tests to hour
  • Removing datatype check from inner loop (there is still one more check in value_as_datetime and value_as_time) but I leave that for a future PR, as well as further performance improvements (e.g. avoiding the Int32Builder, avoiding null checks, adding some microbenchmarks etc.).
  • Returning an error message on unsupported datatypes (instead of returning an array with nulls). This is backwards incompatible, but I think this is reasonable.

@github-actions
Copy link

Copy link
Contributor

@nevi-me nevi-me left a comment

Choose a reason for hiding this comment

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

LGTM, there's a clippy lint and a minor nit.

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 good to me - thanks @Dandandan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants