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

Parens around WHERE condition break query

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 1.2.11, 2.0.2
    • Component/s: None
    • Labels:
    • Environment:

      cqlsh, pdo_cassandra

    • Severity:
      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

            • Assignee:
              dbrosius David Brosius
              Reporter:
              nsv Sergey Nagaytsev
              Authors:
              David Brosius
              Reviewers:
              Sylvain Lebresne
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: