IIRC the maximum precision of TIMESTAMP is part of the type system (RelDataTypeSystem). The default is 3 (milliseconds) but you could create your own type system where the value is 9 (nanoseconds) if you wish.
If you are implementing your plans by generating Java code (i.e. using Enumerable convention) then I believe that code generator assumes that timestamps are implemented as long values (milliseconds since epoch). Overriding that assumption would be significant work. If you are not using Enumerable convention you should be OK. Julian > On Feb 22, 2019, at 8:50 PM, Kenneth Knowles <[email protected]> wrote: > > Hello! > > Beam SQL uses Calcite's codegen for Calc relations. Ideally, we would > support nanosecond precision like java.sql.Timestamp and the new Java 8 > date/time libraries. it looks like there is an assumption of millisecond > precision. Is this nanosecond support possible? I have not grokked the > right way to do this. > > Kenn
