In the Warehouse Catalog, the data type of the string column from a Presto table displays as VarChar (0). The following can be seen via Developer.

If the table in Presto defines the column as VarChar (300) (e.g.,
create table testtable (col1 varchar (300)) ;), then the data type in the Warehouse Catalog will correctly display VarChar (300). However, if the column is defined as a string data type (e.g.,
create table testtable (col1 string) ;), then the Warehouse Catalog will display VarChar (0).


SELECT table_schema NAME_SPACE, table_name TAB_NAME, column_name COL_NAME,
case when data_type like 'char(%' then 'char' when data_type like 'varchar(%' then 'varchar' when data_type like 'decimal(%' then 'decimal' else data_type end DATA_TYPE,
case when data_type = 'varchar' then '335' else split_part(replace(replace(substr(data_type, position('(' in data_type)), '(', ''), ')', ''), ',',1) end DATA_LEN,
case when data_type = 'varchar' then '335' else split_part(replace(replace(substr(data_type, position('(' in data_type)), '(', ''), ')', ''), ',',1) end DATA_PREC,
split_part(replace(replace(substr(data_type, position('(' in data_type)), '(', ''), ')', ''), ',',2) as DATA_SCALE
FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name in (#TABLE_LIST#) and TABLE_SCHEMA = '#Login_Name#' ORDER BY 1, 2, 3

