Create table int type column with CSV format in hive catalog returns the following error
presto> create table hive_data.hive_schema.intcsv ( type int ) with ( format = 'CSV' ) ;
Query failed: Hive CSV storage format only supports VARCHAR (unbounded). Unsupported columns: type integer
From @imjalpreet:
The limitation is due to the serde that Hive/Presto use for CSV, which is OpenCSVSerde. This serde deserializes columns from a CSV file into strings only. Therefore, when creating a CSV table in Presto, the columns can only have an unbounded varchar datatype.
Create table int type column with CSV format in hive catalog returns the following error
From @imjalpreet:
The limitation is due to the serde that Hive/Presto use for CSV, which is OpenCSVSerde. This serde deserializes columns from a CSV file into strings only. Therefore, when creating a CSV table in Presto, the columns can only have an unbounded varchar datatype.
Meanwhile, Trino describes it uses OpenCSVSerde
Trino / Hive : https://trino.io/docs/current/connector/hive.html
CSV - using
org.apache.hadoop.hive.serde2.OpenCSVSerde
.Expected Behavior or Use Case
Add documentation of the limitation and the workaround to the Hive Connector doc.
Workaround
Presto Component, Service, or Connector
Documentation.
Possible Implementation
Context
Help users understand how to use CSV files with the Hive Connector, due to the limitation of the serde that Hive/Presto uses for CSV.