Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-6037

Parens around WHERE condition break query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.11, 2.0.2
    • None
    • cqlsh, pdo_cassandra

    • Low

    Description

      SELECT * FROM user WHERE (key=<UUID>);
      Bad Request: line 1:25 no viable alternative at input '('

      SELECT * FROM user WHERE key=<UUID>; – No parens
      – Normal output

      The example provided is minimal, bug was discovered with AND logic on indexed columns.

      Parens-enclosed conditions is good SQL and so is produced by database abstraction layers in complex queries to avoid operation precedence problems.

      Fixing this at application side is no option - this will open the can of logic bugs.

      Attachments

        1. 6037.txt
          0.5 kB
          David Brosius

        Activity

          People

            dbrosius David Brosius
            nsv Sergey Nagaytsev
            David Brosius
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: