kmitchener commented on code in PR #3239:
URL: https://github.com/apache/arrow-datafusion/pull/3239#discussion_r953143623


##########
docs/source/user-guide/sql/data_types.md:
##########
@@ -22,30 +22,63 @@
 DataFusion uses Arrow, and thus the Arrow type system, for query
 execution. The SQL types from
 
[sqlparser-rs](https://github.com/sqlparser-rs/sqlparser-rs/blob/main/src/ast/data_type.rs#L27)
-are mapped to Arrow types according to the following table
-
-| SQL Data Type | Arrow DataType                                               
            |
-| ------------- | 
------------------------------------------------------------------------ |
-| `CHAR`        | `Utf8`                                                       
            |
-| `VARCHAR`     | `Utf8`                                                       
            |
-| `UUID`        | _Not yet supported_                                          
            |
-| `CLOB`        | _Not yet supported_                                          
            |
-| `BINARY`      | _Not yet supported_                                          
            |
-| `VARBINARY`   | _Not yet supported_                                          
            |
-| `DECIMAL`     | `Float64`                                                    
            |
-| `FLOAT`       | `Float32`                                                    
            |
-| `SMALLINT`    | `Int16`                                                      
            |
-| `INT`         | `Int32`                                                      
            |
-| `BIGINT`      | `Int64`                                                      
            |
-| `REAL`        | `Float32`                                                    
            |
-| `DOUBLE`      | `Float64`                                                    
            |
-| `BOOLEAN`     | `Boolean`                                                    
            |
-| `DATE`        | `Date32`                                                     
            |
-| `TIME`        | `Time64(TimeUnit::Nanosecond)`                               
            |
-| `TIMESTAMP`   | `Timestamp(TimeUnit::Nanosecond)`                            
            |
-| `INTERVAL`    | `Interval(YearMonth)` or `Interval(MonthDayNano)` or 
`Interval(DayTime)` |
-| `REGCLASS`    | _Not yet supported_                                          
            |
-| `TEXT`        | `Utf8`                                                       
            |
-| `BYTEA`       | `Binary`                                                     
            |
-| `CUSTOM`      | _Not yet supported_                                          
            |
-| `ARRAY`       | _Not yet supported_                                          
            |
+are mapped to [Arrow data 
types](https://docs.rs/arrow/latest/arrow/datatypes/enum.DataType.html) 
according to the following table.
+
+## Character Types
+
+| SQL DataType | Arrow DataType |
+| ------------ | -------------- |
+| `CHAR`       | `Utf8`         |
+| `VARCHAR`    | `Utf8`         |
+| `TEXT`       | `Utf8`         |
+
+## Numeric Types
+
+| SQL DataType       | Arrow DataType    |
+| ------------------ | :---------------- |
+| `SMALLINT`         | `Int16`           |
+| `INT` or `INTEGER` | `Int32`           |
+| `BIGINT`           | `Int64`           |
+| `FLOAT`            | `Float32`         |
+| `REAL`             | `Float32`         |
+| `DOUBLE`           | `Float64`         |
+| `DECIMAL(p,s)`     | `Decimal128(p,s)` |
+
+## Date/Time Types
+
+| SQL DataType | Arrow DataType                          |
+| ------------ | :-------------------------------------- |
+| `DATE`       | `Date32`                                |
+| `TIME`       | `Time64(TimeUnit::Nanosecond)`          |
+| `TIMESTAMP`  | `Timestamp(TimeUnit::Nanosecond, None)` |
+
+## Boolean Types
+
+| SQL DataType | Arrow DataType |
+| ------------ | :------------- |
+| `BOOLEAN`    | `Boolean`      |
+
+## Unsupported Types
+
+| SQL Data Type       | Arrow DataType      |
+| ------------------- | :------------------ |
+| `UUID`              | _Not yet supported_ |
+| `BLOB`              | _Not yet supported_ |
+| `CLOB`              | _Not yet supported_ |
+| `BINARY`            | _Not yet supported_ |
+| `VARBINARY`         | _Not yet supported_ |
+| `BYTEA`             | _Not yet supported_ |
+| `REGCLASS`          | _Not yet supported_ |
+| `NVARCHAR`          | _Not yet supported_ |
+| `STRING`            | _Not yet supported_ |
+| `CUSTOM`            | _Not yet supported_ |
+| `ARRAY`             | _Not yet supported_ |
+| `ENUM`              | _Not yet supported_ |
+| `SET`               | _Not yet supported_ |
+| `INTERVAL`          | _Not yet supported_ |

Review Comment:
   Correct, that was incorrect. It said we support BYTEA as well and we do not. 
I'm checking it against this function: 
https://github.com/apache/arrow-datafusion/blob/c72f547a2cdc68f9d0550250456484802893746c/datafusion/sql/src/planner.rs#L537
   
   I'm still familiarizing myself with this code, so let me know if I've 
interpreted this wrong..
   



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