stuartcarnie commented on code in PR #3010:
URL: https://github.com/apache/arrow-datafusion/pull/3010#discussion_r945463524


##########
datafusion/sql/src/planner.rs:
##########
@@ -496,7 +496,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
             SQLDataType::Double => Ok(DataType::Float64),
             SQLDataType::Boolean => Ok(DataType::Boolean),
             SQLDataType::Date => Ok(DataType::Date32),
-            SQLDataType::Time => Ok(DataType::Time64(TimeUnit::Millisecond)),
+            SQLDataType::Time => Ok(DataType::Time64(TimeUnit::Nanosecond)),

Review Comment:
   This change constitutes a fix as `Time64(Millisecond)` is invalid. Rather 
that switch to `Time32(Millisecond)`, I moved to `Time64(Nanosecond)` as 
PostgreSQL requires at least _microsecond_ precision per [the 
documentation](https://www.postgresql.org/docs/14/datatype-datetime.html#DATATYPE-DATETIME-TABLE).
 Given Nanosecond comes at no additional cost, it seems reasonable to support 
the increase in precision.



-- 
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]

Reply via email to