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

select with "in" clause wrongly returns empty result

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.0.3
    • Component/s: None
    • Labels:
      None
    • Environment:

      Cassandra 2.0.2, x86-64 Ubuntu 13.10

    • Severity:
      Normal
    • Since Version:

      Description

      This query returns no result:

      cqlsh:tick_data> select syd from current_prices where shard = 1 and syd in (1, 556129);

      (0 rows)

      However this query does return a result, showing that the previous query was wrong to return no result:

      cqlsh:tick_data> select syd from current_prices where shard = 1 and syd in (556129);

      syd
      --------
      556129

      (1 rows)

      This can be reproduced as follows:

      (a) Create a keyspace tick_data:

      create keyspace tick_data WITH replication =

      {'class': 'SimpleStrategy', 'replication_factor': 1}

      ;

      (b) Create a table current_prices:

      CREATE TABLE current_prices (
      shard int,
      syd int,
      ask decimal,
      bid decimal,
      currency ascii,
      when timeuuid,
      PRIMARY KEY (shard, syd)
      );

      (c) Stop Cassandra and untar the attached tar file in /var/lib/cassandra/data/tick_data/. It populates the current_prices table.

      (d) Restart Cassandra and perform the above selects.

        Attachments

        1. 0001-check-if-any-of-the-slices-intersects.patch
          2 kB
          Marcus Eriksson
        2. 6327.txt
          1 kB
          Sylvain Lebresne
        3. current_prices.tar
          130 kB
          Duncan Sands

          Activity

            People

            • Assignee:
              slebresne Sylvain Lebresne
              Reporter:
              baldrick Duncan Sands
              Authors:
              Sylvain Lebresne
              Reviewers:
              Aleksey Yeschenko
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: