Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-29553

MIN giving wrong results

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 5.5.0
    • 5.5.0
    • secondary-index
    • None
    • Untriaged
    • Centos 64-bit
    • Unknown

    Description

      In build 5.5.0-2669,

      create bucket: simple_table_db_4817420_simple_table

      load the following data:

      {
      "datetime_field1": "2012-03-23 00:00:00",
      "decimal_field1": 4
      },
      {
      "datetime_field1": "2001-12-23 00:00:00",
      "decimal_field1": 28
      },
      {
      "datetime_field1": "2011-05-14 00:00:00",
      "decimal_field1": 28
      },
      {
      "datetime_field1": "2001-08-04 00:00:00",
      "decimal_field1": 34
      },
      {
      "datetime_field1": "2014-08-14 00:00:00",
      "decimal_field1": 36
      },
      {
      "datetime_field1": "2010-11-11 00:00:00",
      "decimal_field1": 39
      }

      Create index:
      CREATE INDEX simple_table_aggregate_pushdown_index_24366568 ON simple_table_db_4817420_simple_table( decimal_field1 , datetime_field1 ) WHERE   decimal_field1  IN [  4 , 28 , 34 , 36 , 39  ]

      Run the following query (gives incorrect results):

      SELECT MIN( datetime_field1 ) FROM   simple_table_db_4817420_simple_table    WHERE   decimal_field1  IN [  4 , 28 , 34 , 36 , 39  ]

      [
      {
      "$1": "2012-03-23 00:00:00"
      }
      ]

      Run the following query (gives correct results):

      SELECT MIN( datetime_field1 ) as M1, MAX( datetime_field1) as M2 FROM   simple_table_db_4817420_simple_table  WHERE   decimal_field1  IN [  4 , 28 , 34 , 36 , 39  ]

      [
      {
      "M1": "2001-08-04 00:00:00",
      "M2": "2014-08-14 00:00:00"
      }
      ]

      Attachments

        For Gerrit Dashboard: MB-29553
        # Subject Branch Project Status CR V

        Activity

          Prathibha Bisarahalli are you looking at this? any status update?

          korrigan.clark Korrigan Clark (Inactive) added a comment - Prathibha Bisarahalli are you looking at this? any status update?

          This seems to be a regression from MB-27861. Need to make some changes to the rules implemented as part of MIN optimization. Working on it.

          prathibha Prathibha Bisarahalli (Inactive) added a comment - This seems to be a regression from MB-27861 . Need to make some changes to the rules implemented as part of MIN optimization. Working on it.

          Fix merged to unstable. Will update push to master

          prathibha Prathibha Bisarahalli (Inactive) added a comment - Fix merged to unstable. Will update push to master

          Build couchbase-server-5.5.0-2730 contains indexing commit af8b9cd76f7561ac30a6272eef7e91ac240291f4 with commit message:
          MB-29553: Simplify rules for MIN optmization
          https://github.com/couchbase/indexing/commit/af8b9cd76f7561ac30a6272eef7e91ac240291f4

          build-team Couchbase Build Team added a comment - Build couchbase-server-5.5.0-2730 contains indexing commit af8b9cd76f7561ac30a6272eef7e91ac240291f4 with commit message: MB-29553 : Simplify rules for MIN optmization https://github.com/couchbase/indexing/commit/af8b9cd76f7561ac30a6272eef7e91ac240291f4

          Build couchbase-server-6.0.0-1139 contains indexing commit af8b9cd76f7561ac30a6272eef7e91ac240291f4 with commit message:
          MB-29553: Simplify rules for MIN optmization
          https://github.com/couchbase/indexing/commit/af8b9cd76f7561ac30a6272eef7e91ac240291f4

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.0.0-1139 contains indexing commit af8b9cd76f7561ac30a6272eef7e91ac240291f4 with commit message: MB-29553 : Simplify rules for MIN optmization https://github.com/couchbase/indexing/commit/af8b9cd76f7561ac30a6272eef7e91ac240291f4

          People

            korrigan.clark Korrigan Clark (Inactive)
            korrigan.clark Korrigan Clark (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty