datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

feat: Add DateFieldExtractStyle::Strftime support for SqliteDialect

Open peasee opened this issue 1 year ago • 0 comments

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 support strftime, as any other scalar function results in SQLite query errors.

What changes are included in this PR?

  • Changes the default DateFieldExtractStyle for SQLite to Strftime
  • Implements the unparser for DateFieldExtractStyle::Strftime to use strftime instead of date_part

Are these changes tested?

Yes

Are there any user-facing changes?

No?

peasee avatar Aug 26 '24 00:08 peasee