Skip to content

SQL: Improve translation of time floor expressions.#5107

Merged
fjy merged 3 commits intoapache:masterfrom
gianm:sql-time-floor-xlate
Nov 29, 2017
Merged

SQL: Improve translation of time floor expressions.#5107
fjy merged 3 commits intoapache:masterfrom
gianm:sql-time-floor-xlate

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Nov 20, 2017

The main change is to TimeFloorOperatorConversion.applyTimestampFloor.

  • Prefer timestamp_floor expressions to timeFormat extractionFns, to
    avoid turning things into strings when it isn't necessary.
  • Collapse CAST(FLOOR(X TO Y) AS DATE) to FLOOR(X TO Y) if appropriate.

The main change is to TimeFloorOperatorConversion.applyTimestampFloor.

- Prefer timestamp_floor expressions to timeFormat extractionFns, to
  avoid turning things into strings when it isn't necessary.
- Collapse CAST(FLOOR(X TO Y) AS DATE) to FLOOR(X TO Y) if appropriate.
@fjy fjy merged commit 5f6bdd9 into apache:master Nov 29, 2017
@jon-wei jon-wei added this to the 0.12.0 milestone Jan 5, 2018
@gianm gianm deleted the sql-time-floor-xlate branch September 23, 2022 19:28
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