Skip to content

fix: Harden DATE_FORMAT and TO_TIMESTAMP DuckDB translations#2054

Merged
ferenc-csaky merged 1 commit intomainfrom
fix/translation-hardening
May 5, 2026
Merged

fix: Harden DATE_FORMAT and TO_TIMESTAMP DuckDB translations#2054
ferenc-csaky merged 1 commit intomainfrom
fix/translation-hardening

Conversation

@ferenc-csaky
Copy link
Copy Markdown
Collaborator

Handle empty strings and NULL values the same way as Flink in the mentioned DuckDB translations.

Instead of throwing an exception, the translated expression should return NULL in all of these incomprehensible situations.

@ferenc-csaky ferenc-csaky added this to the 0.10.3 milestone May 5, 2026
@ferenc-csaky ferenc-csaky added the bug Something isn't working label May 5, 2026
@ferenc-csaky ferenc-csaky requested review from mateczagany and velo May 5, 2026 14:41
@ferenc-csaky ferenc-csaky force-pushed the fix/translation-hardening branch from cb89a79 to 848a3f8 Compare May 5, 2026 15:00
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 0% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 12.99%. Comparing base (a8ef976) to head (848a3f8).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ation/duckdb/builtin/DateFormatSqlTranslation.java 0.00% 13 Missing ⚠️
...tion/duckdb/builtin/ToTimestampSqlTranslation.java 0.00% 12 Missing ⚠️
...tion/duckdb/builtin/DuckDbSqlTranslationUtils.java 0.00% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2054      +/-   ##
============================================
- Coverage     13.00%   12.99%   -0.02%     
  Complexity      803      803              
============================================
  Files           606      606              
  Lines         17437    17456      +19     
  Branches       2102     2101       -1     
============================================
  Hits           2268     2268              
- Misses        14967    14986      +19     
  Partials        202      202              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ferenc-csaky ferenc-csaky merged commit 4e6a360 into main May 5, 2026
16 checks passed
@ferenc-csaky ferenc-csaky deleted the fix/translation-hardening branch May 5, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants