brianmhess / cassandra-loader

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

treat schema parameter as case sensitive #32

Open al3xandru opened 8 years ago

al3xandru commented 8 years ago

Do all the necessary escaping internally so schema parameter can be treated as case sensitive

brianmhess commented 8 years ago

The current version does allow you to use case-sensitive keyspace, table, and column names. For example, you can do -schema 'myks."MyTable"(col1, "Col2")' Does that cover the use case you are looking to address?

al3xandru commented 8 years ago

That gets unnecessarily cumbersome very fast.

phact commented 8 years ago

The double quotes standard around upper case keyspaces and columns is a cassandra standard. You have to do it in cqlsh, at the driver, etc.

I see your point about it being a bit cumbersome however and am having trouble thinking of downsides of the change. What happens if there's a table called myTable and another table called mytable. Would this be able to tell the difference?

brianmhess commented 8 years ago

Based on this https://docs.datastax.com/en/cql/3.3/cql/cql_reference/ucase-lcase_r.html I think requiring double quotes to get case sensitivity is necessary (even if a bit cumbersome).

phact commented 8 years ago

With JSON, this becomes a bigger issue because now we're requiring the column names to come escaped in the JSON file. Nobody will have this. I think it's time to re-evaluate

phact commented 8 years ago

Here's a new PR to deal with the JSON issue.