datafusion
datafusion copied to clipboard
feat: Add DateFieldExtractStyle::Strftime support for SqliteDialect
Which issue does this PR close?
Closes #12160
Rationale for this change
- In SQLite, the only way to extract date information is through
strftime. The unparser needs to be updated to supportstrftime, as any other scalar function results in SQLite query errors.
What changes are included in this PR?
- Changes the default
DateFieldExtractStylefor SQLite toStrftime - Implements the unparser for
DateFieldExtractStyle::Strftimeto usestrftimeinstead ofdate_part
Are these changes tested?
Yes
Are there any user-facing changes?
No?