alamb commented on issue #22266:
URL: https://github.com/apache/datafusion/issues/22266#issuecomment-4521600313

   > I think the SQL standard is a good place to start. In most situations, 
that is what Postgres follows, usually unless there is a good reason to deviate.
   
   I know people love to bandy around the term "SQL Standard" (and I have a 
copy of "Information technology — Database languages —SQL — Part 2: Foundation 
(SQL/Foundation)" !) but it is a pretty bad example of a spec in my opinion and 
leaves a lot of things "implementations defined" 
   
   For example here is an excerpt about `extract`
   
   
   7) If <extract expression> is specified, then
   Case:
   a) If <extract field> is a <primary datetime field> that does not specify 
SECOND or <extract field> is
   not a <primary datetime field>, then the declared type of the result is an 
implementation-defined exact
   numeric type with scale 0 (zero).
   b) Otherwise, the declared type of the result is an implementation-defined 
exact numeric type with scale
   not less than the specified or implied <time fractional seconds precision> 
or <interval fractional seconds
   precision>, as appropriate, of the SECOND <primary datetime field> of the 
<extract source>.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to