Giter VIP home page Giter VIP logo

Comments (9)

nsd20463 avatar nsd20463 commented on June 28, 2024

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.

maticmeznar avatar maticmeznar commented on June 28, 2024

@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.

0x6e6562 avatar 0x6e6562 commented on June 28, 2024

@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.

0x6e6562 avatar 0x6e6562 commented on June 28, 2024

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.

maticmeznar avatar maticmeznar commented on June 28, 2024

@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.

0x6e6562 avatar 0x6e6562 commented on June 28, 2024

@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.

0x6e6562 avatar 0x6e6562 commented on June 28, 2024

@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.

bobu avatar bobu commented on June 28, 2024

I've just verified that this fixes support for Cassandra 2.2 (in my case, I'm running 2.2.3).

from cqlc.

0x6e6562 avatar 0x6e6562 commented on June 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.