LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[FRG-201] Extract function does not support subsecond precision for intervals #671

Open dynamobi-build opened 12 years ago

dynamobi-build commented 12 years ago

[reporter="angel", created="Mon, 11 Sep 2006 23:11:56 -0500 (GMT-05:00)"] Subsecond precision is not supported by the Extract funciton (note that extracting from datetime types is also not supported, only interval types are supported right now)

To support subsecond precision, see TODOs in SqlExtractFunction and StandardConvertletTable.convertExtract.

  1. In SqlExtractFunction, the return type should be changed from so that it is SqlTypeStategies.rtiNullableBigint if the extract field doesn't have second, and is a suitable decimal type (with the appropriate precision), if seconds are involved. See SQL 2003, chapter 2, section 6.27. syntax rules 4, 5.

  2. convertExtract need to be updated to handle decimal seconds

  3. Should also add tests to SqlOperatorTests.testExtractFunc