brianmhess / cassandra-loader

Delimited file loader for Cassandra
Apache License 2.0
197 stars 93 forks source link

Parse cqlSchema manually to avoid limitations of univocity csv parser #66

Closed alfredo-gimenez closed 7 years ago

alfredo-gimenez commented 7 years ago

Fixes issue #65 EDIT: and #74

jbax commented 7 years ago

Hi there the parser is not restricted to 4096 characters, this is just the default limit. You can increase it or simply set the limit to -1 to not have a limit at all.

As per javadoc, all you need to do is to use:

settings.setMaxCharsPerColumn(-1); and be done with it.

Hope this helps.

alfredo-gimenez commented 7 years ago

Sure, but using the csv parser with parentheses delimiters also causes other problems.

Consider the valid table:

CREATE TABLE test.blah (
    "blee(blorg)" int PRIMARY KEY,
    "bloo.blarg" text
)

This pull request fixes those bugs as well.

jbax commented 7 years ago

Got it! Why on earth would someone try to parse a CREATE TABLE statement with a CSV parser? That's bound to cause havoc.