Skip to content

Commit ac13077

Browse files
committed
Implmenet datetime sql type
1 parent 7909909 commit ac13077

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

datafusion/sql/src/planner.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,13 +743,15 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
743743
.collect::<Result<Vec<_>>>()?;
744744
Ok(DataType::Struct(Fields::from(fields)))
745745
}
746+
SQLDataType::Datetime(None) => Ok(DataType::Timestamp(TimeUnit::Microsecond, None)),
746747
SQLDataType::Nvarchar(_)
747748
| SQLDataType::JSON
748749
| SQLDataType::Uuid
749750
| SQLDataType::Binary(_)
750751
| SQLDataType::Varbinary(_)
751752
| SQLDataType::Blob(_)
752-
| SQLDataType::Datetime(_)
753+
// precision is not supported
754+
| SQLDataType::Datetime(Some(_))
753755
| SQLDataType::Regclass
754756
| SQLDataType::Custom(_, _)
755757
| SQLDataType::Array(_)

0 commit comments

Comments
 (0)