EMCECS / presto-s3-connector

Apache License 2.0
8 stars 3 forks source link

Create table format does not support varchar field limits, like VARCHAR(16) #78

Closed chipmaurer closed 3 years ago

chipmaurer commented 3 years ago

presto:cartoondb> describe addresstable; Column | Type | Extra | Comment ---------+-------------+-------+--------- name | varchar(25) | | address | varchar(64) | | (2 rows)

presto:cartoondb> CREATE TABLE s3.newdb.table1 with (has_header_row = 'false', FORMAT = 'CSV', external_location='s3a://testbucket/newdb/') as SELECT * from s3.cartoondb.addresstable;

Query 20211107_220629_00006_azdfb, FAILED, 1 node Splits: 19 total, 18 done (94.74%) 0:01 [3 rows, 172B] [3 rows/s, 224B/s]

Query 20211107_220629_00006_azdfb failed: Schema is malformed. Verify the schema data and type

The problem is in S3SchemaRegistryManager. The createTable method only looks for VARCHAR column names