fix(cubesql): Support EXTRACT(EPOCH) over timestamp diff on Snowflake#11105
fix(cubesql): Support EXTRACT(EPOCH) over timestamp diff on Snowflake#11105MazterQyou wants to merge 1 commit into
Conversation
Signed-off-by: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com>
|
Claude finished @MazterQyou's task in 50s —— View job Code ReviewVerdict: LGTM — 0 high, 0 medium, 2 low (nits)
SummaryClean, well-scoped change. The detection path is correctly gated: dialect must opt in via The Snowflake template The test covers both arms — generic dialect keeps Nits (low)
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11105 +/- ##
==========================================
- Coverage 83.61% 79.10% -4.51%
==========================================
Files 256 472 +216
Lines 78904 96264 +17360
Branches 0 3524 +3524
==========================================
+ Hits 65975 76152 +10177
- Misses 12929 19597 +6668
- Partials 0 515 +515
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Check List
Description of Changes Made
This PR detects
EXTRACT(EPOCH FROM (a - b))over a timestamp subtraction in the wrapper and, when the dialect provides anexpressions/extract_epoch_difftemplate, renders the operands separately as a seconds diff. This is needed because Snowflake acceptsEPOCHon a timestamp but not on an interval. Snowflake maps it toDATEDIFF(SECOND, b, a); all other dialects fall back to the existingEXTRACT(EPOCH FROM (a - b))output unchanged. Related test is included.