dolt
dolt copied to clipboard
dolt schema import does not support long columns
The max it will create is a varchar(16383) so if you try to import a CSV with longer columns it will fail.
is not valid for column "client" (type "VARCHAR(16383)")
Here is the repro.
File: ab_test.csv
dolt init
dolt table import ab_test ab_test.csv -c --pk=abtest_id
Here is the dolt schema import output:
test-csv-json-issue $ dolt schema import --dry-run ab_test ab_test.csv -c --pks abtest_id
CREATE TABLE `ab_test` (
`abtest_id` int unsigned NOT NULL,
`client` varchar(16383) NOT NULL,
`condition_col` varchar(16383) NOT NULL,
`condition_bin` varchar(16383) NOT NULL,
`is_enabled` bit(1) NOT NULL,
`comment` varchar(16383) NOT NULL,
PRIMARY KEY (`abtest_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Dolt should create TEXT columns instead.