mvzink opened a new pull request, #1984:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1984

   [Postgres] allows extra options for the `INTERVAL` data type; namely fields 
and subsecond precision. For example `'3 years 1 second'::interval year to 
month` casts the interval and strips the seconds, and `'1.3333 
seconds'::interval(1)` returns `1.3` seconds.
   
   This is supported by adding two optional fields to `DataType::Interval`, 
along with a new `enum` for the allowed fields.
   
   Note that [MSSQL] also supports similar options, but with more complicated 
precision syntax, e.g. `INTERVAL HOUR(p) TO SECOND(q)`. This is not implemented 
in this commit because I don't have a way to test it.
   
   [Postgres]: https://www.postgresql.org/docs/17/datatype-datetime.html
   [MSSQL]: 
https://learn.microsoft.com/en-us/sql/odbc/reference/appendixes/sql-data-types?view=sql-server-ver17


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to