Comments (9)
I'm not the cqlc author, but we happened to find this same error the other day. It comes from the getTableMetaData() function of the gocql package. cqlc uses this function to read the schema. Cassandra 2.2 removed key_aliases (and column_aliases and value_aliases) from this table. So the function breaks.
The quick fix is to use Cassandra 2.1.
from cqlc.
@nsd20463 Thank you! You just saved me a lot of time. I hope support for Cassandra 2.2 is added soon. What does the cqlc author say about that?
from cqlc.
@maticmeznar I don't see why this shouldn't be added, considering that 2.2.0 is now one of the supported versions in gocql. I can let you know when that happens, or if you want to speed the process up a bit, feel free to raise a PR.
from cqlc.
I've had a closer look at this and have tried a few things out. It turns out that setting ProtoVersion
on the gocql cluster config to 4 will avoid the issue with key_aliases
. However, there are other few compatibility issues that need to get cleaned up to declare this to be ready for 2.2.+
from cqlc.
@0x6e6562 Thank you for looking into this. I've currently resorted to using plain gocql as I can't find a way to set per query consistency level when using cqlc. I presume it's not supported.
from cqlc.
@maticmeznar cqlc tries not to hide any of the gocql API from the app, but there may be some use cases where it doesn't achieve this - in which case we would need to revise the cqlc API to make this happen.
However, I'm wondering whether this part of the user guide can give you an idea of how to access the *gocql.Query
object to set the per-query consistency level?
from cqlc.
@maticmeznar @nsd20463 I've just merged #29 which now runs the test suite against 2.1.9 and 2.2.1 (and in doing so, deprecating support for 2.0.x). The functional change in the cqlc
compiler is that it now looks for the native version of the server from which it is trying to harvest the schema. If it detects that the protocol version is above 3 (i.e. as in the case of 2.2.x), cqlc
will re-connect to the server using the upgraded protocol version. This avoids the key_aliases
issue in 2.2.x. Let me know if this works for you.
from cqlc.
I've just verified that this fixes support for Cassandra 2.2 (in my case, I'm running 2.2.3).
from cqlc.
@bobu Many thanks for verifying this fix :-)
@maticmeznar @nsd20463 I'll still leave this issue open for a while to give you more time to try this out.
from cqlc.
Related Issues (20)
- Tutorial schema file Forbidden HOT 4
- Missing definition: cqlc.EqualityStringStringMapColumn HOT 1
- panic: runtime error: invalid memory address or nil pointer dereference (render.go) HOT 4
- Unable to install with `go get` HOT 4
- frozen collections inside collections generate error HOT 1
- Struct tags for json/cql marshalling/unmarshalling HOT 1
- User-defined functions and aggregates in Cassandra 2.2 HOT 2
- cqlc not returning all rows HOT 1
- Using Protocol 4
- Support for TTL and Timestamp for Insert statements
- installation failed HOT 4
- Compilation failure with new gocql driver HOT 10
- Does cqlc support Extending a Map? HOT 1
- CQLC: Go Cassandra query returning page token for boundary limit?
- connection reset error
- FieldA.Eq undefined (type cqlc.BooleanColumn has no field or method Eq)
- Build the cqlc library
- Secondary index on composite partition key breaks code generation
- "ORDER BY" clause in schema breaks code generation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cqlc.