Background: I am writing an ActiveRecord adapter for Cassandra, specifically one that builds on the JDBC driver (activerecord-jdbccassandra-adapter).
Problem: CQL resembles SQL, but it has some notable differences. The main one I am running up against right now is that it does not expect table names to be attached to column references in the queries and fails when they are. In SQL these prefixes are optional, unless they are being used to disambiguate complex queries.
So, how can I make ActiveRecord stop prepending the table names to column references? I'm not sure if this needs to happen in ActiveRecord or possibly in ActiveRelation, which is part of my issue with being unable to resolve this issue.
Example:
SQL from ActiveRecord:
SELECT positions.* FROM positions WHERE positions.sku = 'LM_180114' LIMIT 1
Desired CQL:
SELECT * FROM positions WHERE sku = 'LM_180114' LIMIT 1