alamb commented on code in PR #3167:
URL: https://github.com/apache/arrow-datafusion/pull/3167#discussion_r946144542


##########
datafusion/core/tests/sql/mod.rs:
##########
@@ -631,7 +631,7 @@ async fn register_aggregate_csv_by_sql(ctx: 
&SessionContext) {
         c2  INT NOT NULL,
         c3  SMALLINT NOT NULL,
         c4  SMALLINT NOT NULL,
-        c5  INT NOT NULL,
+        c5  INTEGER NOT NULL,

Review Comment:
   with this change, many of the `sql_integration` tests fail



##########
datafusion/sql/src/planner.rs:
##########
@@ -498,7 +498,30 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
             SQLDataType::Date => Ok(DataType::Date32),
             SQLDataType::Time => Ok(DataType::Time64(TimeUnit::Nanosecond)),
             SQLDataType::Timestamp => 
Ok(DataType::Timestamp(TimeUnit::Nanosecond, None)),
-            _ => Err(DataFusionError::NotImplemented(format!(
+            // Explicitly list all other types so that if sqlparser

Review Comment:
   This does not change the behavior, but makes the current behavior more 
explicit in my opinion
   
   It also makes clear some surprising things (like  several `unsigned` 
variants appear not to be supported along with `interval` as noted by 
@waitingkuo  in 
https://github.com/apache/arrow-datafusion/issues/3166#issuecomment-1215832724



##########
datafusion/sql/src/planner.rs:
##########
@@ -483,7 +483,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
     fn make_data_type(&self, sql_type: &SQLDataType) -> Result<DataType> {
         match sql_type {
             SQLDataType::BigInt(_) => Ok(DataType::Int64),
-            SQLDataType::Int(_) => Ok(DataType::Int32),
+            SQLDataType::Int(_) | SQLDataType::Integer(_) => 
Ok(DataType::Int32),

Review Comment:
   this is the fix
   



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