How to parse EXTRACT(MINUTE FROM datetime1 - datetime2) #436
-
I think the solution would be to modify parse_from if FROM is preceded by 'EXTRACT(foobar '. |
Beta Was this translation helpful? Give feedback.
Answered by
georgesittas
Sep 15, 2022
Replies: 2 comments 1 reply
-
Sqlglot already parses |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yuchaofan13
-
Got it working, thank you!!
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sqlglot already parses
extract(minute from datetime1)
. The problem is with the subtraction, because_parse_extract
currently parses the part afterfrom
using_parse_type
. If you use a more general parser method, it'll work just fine.