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

RQG: Secondary indexes without index hints not giving correct results for sum,average,count

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 4.1.0
    • 4.1.0, 4.5.0
    • query
    • Security Level: Public
    • Untriaged
    • Centos 64-bit
    • Yes

    Description

      Test case failed: rqg.test_rqg.RQGTests.test_rqg_concurrent_new
      test_file_path=b/resources/rqg/simple_table_db/query_tests_using_templates/query_50000_aggregate_functions.txt.zip,database=multiple_table_db

      With error:
      Scenario :: run_query_without_index_hint
      Reason :: mismatch in results :: expected [0:1]:: [1163895], actual [0:1]:: [4655580]

      sql_query :: SELECT SUM( int_field1 ) FROM simple_table_10 WHERE ((bool_field1 OR NOT (decimal_field1 IN ( 2 , 22 , 23 , 54 , 73 )))) AND ((bool_field1 != false AND decimal_field1 > 4937))
      n1ql_query :: SELECT SUM( int_field1 ) FROM simple_table_10 WHERE ((bool_field1 OR NOT (decimal_field1 IN [ 2 , 22 , 23 , 54 , 73 ]))) AND ((bool_field1 != false AND decimal_field1 > 4937))
      <<<<<<<<<< TEST 8702 >>>>>>>>>>>
      keyword_list :: ['IN', 'NOT', 'OR']
      run_result ::
      ____________________________________________________
      Scenario :: run_query_without_index_hint
      Reason :: mismatch in results :: expected [0:1]:: [2438509], actual [0:1]:: [4877018]

      sql_query :: SELECT SUM( decimal_field1 ) FROM simple_table_1 WHERE NOT ((NOT (bool_field1) OR decimal_field1 IN ( 54 , 55 , 62 , 105 , 111 )))
      n1ql_query :: SELECT SUM( decimal_field1 ) FROM simple_table_1 WHERE NOT ((NOT (bool_field1) OR decimal_field1 IN [ 54 , 55 , 62 , 105 , 111 ]))

      Difference in results are seen in AVG and Count also .

      Attachments

        1. backupbuckets.tar
          270 kB
        2. database_dump.zip
          377 kB
        3. secondary_index_definitions.txt
          78 kB
        4. source_input_rqg_run.txt
          206 kB
        For Gerrit Dashboard: MB-16291
        # Subject Branch Project Status CR V

        Activity

          People

            Prerna.Manaktala Prerna Manaktala (Inactive)
            Prerna.Manaktala Prerna Manaktala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty