fix(cubesql): Support EXTRACT(EPOCH) over timestamp diff on Snowflake#11105
Conversation
|
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% 83.67% +0.06%
==========================================
Files 256 257 +1
Lines 78904 79360 +456
==========================================
+ Hits 65975 66405 +430
- Misses 12929 12955 +26
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:
|
80cba97 to
465ba42
Compare
|
Claude finished @MazterQyou's task in 56s —— View job Code ReviewVerdict: LGTM — 0 high, 0 medium, 2 low (nits). Re-affirmed on PR sync; head commit unchanged since prior review. Details
SummaryClean, well-scoped change. The detection path is correctly gated: dialect must opt in via
Snowflake template The test covers both arms — generic dialect keeps Nits (low)
|
Signed-off-by: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com>
465ba42 to
d14c442
Compare
|
Claude finished @MazterQyou's task in 29s —— View job Code ReviewVerdict: LGTM — 0 high, 0 medium, 2 low (nits). Re-affirmed on PR sync; head commit unchanged ( Details
SummaryClean, well-scoped change. The detection path is correctly gated: dialect must opt in via
Snowflake template The test covers both arms — generic dialect keeps Nits (low)
• Branch: |
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 toTIMESTAMPDIFF(MICROSECOND, b, a) / 1000000; all other dialects fall back to the existingEXTRACT(EPOCH FROM (a - b))output unchanged. Related test is included.