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

CBAS RQG for Arithmetic functions: Mentioned cbas queries have different result in comparison to SQL.

    XMLWordPrintable

Details

    • Untriaged
    • Unknown

    Description

      sql_query :: SELECT bool_field1 FROM simple_table WHERE ( ( decimal_field1 >= TRUNCATE( 1000 * LOG( 5071 ), 0 ) ) ) AND ( ( NOT ( bool_field1 ) ) ) ORDER BY char_field1
      cbas_query :: SELECT bool_field1 FROM simple_table_db_84091977_simple_table WHERE ( ( decimal_field1 >= TRUNC( 1000 * LOG( 5071 ), 0 ) ) ) AND ( ( NOT ( bool_field1 ) ) ) ORDER BY char_field1

      =========================================================

      sql_query :: SELECT varchar_field1 FROM simple_table WHERE ( ( bool_field1 ) ) AND ( ( decimal_field1 >= TRUNCATE( 1000 * LN( 5071 ), 0 ) ) ) OR ( ( NOT ( bool_field1 ) ) ) AND ( ( decimal_field1 > TRUNCATE( 1000 * ACOS( 5071 ), 0 ) ) ) ORDER BY int_field1
      cbas_query :: SELECT varchar_field1 FROM simple_table_db_84091977_simple_table WHERE ( ( bool_field1 ) ) AND ( ( decimal_field1 >= TRUNC( 1000 * LN( 5071 ), 0 ) ) ) OR ( ( NOT ( bool_field1 ) ) ) AND ( ( decimal_field1 > TRUNC( 1000 * ACOS( 5071 ), 0 ) ) ) ORDER BY int_field1

      =========================================================

      sql_query :: SELECT DISTINCT( primary_key_id ) FROM simple_table WHERE ( ( varchar_field1 <= SUBSTR( "ZBqhMErfuR", 1 ) ) ) AND ( NOT ( ( NOT (decimal_field1 >= TRUNCATE( 1000 * ASIN( 5071 ), 0 )) ) ) ) OR ( NOT ( NOT ( ( bool_field1 = true ) ) ) ) AND ( ( varchar_field1 IN ( "AAzaaKLuoS" , "ABlcYEhyhK" , "ADRnwiUKxf" , "ALPGArgccj" , "APzAeWkBhu" ) ) ) ORDER BY bool_field1
      cbas_query :: SELECT DISTINCT( primary_key_id ) FROM simple_table_db_84091977_simple_table WHERE ( ( varchar_field1 <= SUBSTR( "ZBqhMErfuR", 0 ) ) ) AND ( NOT ( ( NOT (decimal_field1 >= TRUNC( 1000 * ASIN( 5071 ), 0 )) ) ) ) OR ( NOT ( NOT ( ( bool_field1 = true ) ) ) ) AND ( ( varchar_field1 IN [ "AAzaaKLuoS" , "ABlcYEhyhK" , "ADRnwiUKxf" , "ALPGArgccj" , "APzAeWkBhu" ] ) ) ORDER BY bool_field1

      =========================================================

      sql_query :: SELECT * FROM simple_table WHERE ( ( int_field1 >= TRUNCATE( 1000 * ASIN( 47941685 ), 0 ) ) ) OR ( ( varchar_field1 < RTRIM( "ZBqhMErfuR" ) ) ) ORDER BY bool_field1
      cbas_query :: SELECT * FROM simple_table_db_84091977_simple_table WHERE ( ( int_field1 >= TRUNC( 1000 * ASIN( 47941685 ), 0 ) ) ) OR ( ( varchar_field1 < RTRIM( "ZBqhMErfuR" ) ) ) ORDER BY bool_field1

      =========================================================

      sql_query :: SELECT DISTINCT( char_field1 ) FROM simple_table WHERE ( ( primary_key_id < SUBSTR( "549", 1 ) ) ) AND ( ( NOT (decimal_field1 < TRUNCATE( 1000 * ACOS( 5071 ), 0 )) ) ) OR ( ( bool_field1 ) ) AND ( ( char_field1 LIKE '%N%' ) ) ORDER BY bool_field1
      cbas_query :: SELECT DISTINCT( char_field1 ) FROM simple_table_db_84091977_simple_table WHERE ( ( primary_key_id < SUBSTR( "549", 0 ) ) ) AND ( ( NOT (decimal_field1 < TRUNC( 1000 * ACOS( 5071 ), 0 )) ) ) OR ( ( bool_field1 ) ) AND ( ( char_field1 LIKE '%N%' ) ) ORDER BY bool_field1

      =========================================================

      sql_query :: SELECT * FROM simple_table WHERE ( ( NOT ( varchar_field1 > LTRIM( "ZBqhMErfuR" ) ) ) ) AND ( ( bool_field1 = true ) ) OR ( ( decimal_field1 != TRUNCATE( 1000 * ACOS( 5071 ), 0 ) ) ) AND ( ( ( char_field1 IN ( "A" , "B" , "C" , "D" , "E" ) ) AND ( primary_key_id NOT LIKE "549" ) ) ) ORDER BY char_field1
      cbas_query :: SELECT * FROM simple_table_db_84091977_simple_table WHERE ( ( NOT ( varchar_field1 > LTRIM( "ZBqhMErfuR" ) ) ) ) AND ( ( bool_field1 = true ) ) OR ( ( decimal_field1 != TRUNC( 1000 * ACOS( 5071 ), 0 ) ) ) AND ( ( ( char_field1 IN [ "A" , "B" , "C" , "D" , "E" ] ) AND ( primary_key_id NOT LIKE "549" ) ) ) ORDER BY char_field1

      =========================================================

      sql_query :: SELECT DISTINCT( bool_field1 ) FROM simple_table WHERE ( ( bool_field1 ) ) AND ( ( NOT (NOT (decimal_field1 >= TRUNCATE( 1000 * ASIN( 5071 ), 0 ))) ) ) OR ( ( char_field1 IN ( "A" , "B" , "C" , "D" , "E" ) ) ) AND ( ( bool_field1 != true ) ) ORDER BY decimal_field1
      cbas_query :: SELECT DISTINCT( bool_field1 ) FROM simple_table_db_84091977_simple_table WHERE ( ( bool_field1 ) ) AND ( ( NOT (NOT (decimal_field1 >= TRUNC( 1000 * ASIN( 5071 ), 0 ))) ) ) OR ( ( char_field1 IN [ "A" , "B" , "C" , "D" , "E" ] ) ) AND ( ( bool_field1 != true ) ) ORDER BY decimal_field1

      =========================================================

      sql_query :: SELECT * FROM simple_table WHERE ( ( ( varchar_field1 NOT BETWEEN "AAzaaKLuoS" and "zwDIxgKAOl" ) ) OR ( ( ( char_field1 IN ( "A" , "B" , "C" , "D" , "E" ) ) ) AND ( ( int_field1 != TRUNCATE( 1000 * ASIN( 47941685 ), 0 ) ) ) ) ) AND ( NOT ( NOT ( ( bool_field1 ) ) ) ) ORDER BY decimal_field1
      cbas_query :: SELECT * FROM simple_table_db_84091977_simple_table WHERE ( ( ( varchar_field1 NOT BETWEEN "AAzaaKLuoS" and "zwDIxgKAOl" ) ) OR ( ( ( char_field1 IN [ "A" , "B" , "C" , "D" , "E" ] ) ) AND ( ( int_field1 != TRUNC( 1000 * ASIN( 47941685 ), 0 ) ) ) ) ) AND ( NOT ( NOT ( ( bool_field1 ) ) ) ) ORDER BY decimal_field1

      =========================================================

      sql_query :: SELECT * FROM simple_table WHERE NOT ( NOT ( ( ( NOT ( bool_field1 ) ) ) AND ( NOT ( ( decimal_field1 > TRUNCATE( 1000 * LOG( 5071 ), 0 ) ) ) ) ) ) ORDER BY bool_field1
      cbas_query :: SELECT * FROM simple_table_db_84091977_simple_table WHERE NOT ( NOT ( ( ( NOT ( bool_field1 ) ) ) AND ( NOT ( ( decimal_field1 > TRUNC( 1000 * LOG( 5071 ), 0 ) ) ) ) ) ) ORDER BY bool_field1

      =========================================================

      sql_query :: SELECT DISTINCT( bool_field1 ) FROM simple_table WHERE NOT ( ( decimal_field1 <= TRUNCATE( 1000 * ACOS( 5071 ), 0 ) ) ) ORDER BY int_field1
      cbas_query :: SELECT DISTINCT( bool_field1 ) FROM simple_table_db_84091977_simple_table WHERE NOT ( ( decimal_field1 <= TRUNC( 1000 * ACOS( 5071 ), 0 ) ) ) ORDER BY int_field1

      =========================================================

      sql_query :: SELECT bool_field1 FROM simple_table WHERE ( NOT ( NOT ( NOT ( ( primary_key_id >= REPLACE( "549" , "d" , "c" ) ) ) ) ) ) AND ( ( decimal_field1 < TRUNCATE( 1000 * LOG( 5071 ), 0 ) ) ) ORDER BY int_field1
      cbas_query :: SELECT bool_field1 FROM simple_table_db_84091977_simple_table WHERE ( NOT ( NOT ( NOT ( ( primary_key_id >= REPLACE( "549" , "d" , "c" ) ) ) ) ) ) AND ( ( decimal_field1 < TRUNC( 1000 * LOG( 5071 ), 0 ) ) ) ORDER BY int_field1

      Attachments

        1. backup.zip
          69 kB
        2. data.json
          291 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          There are no commits yet on this issue.

          People

            ritesh.agarwal Ritesh Agarwal
            ritesh.agarwal Ritesh Agarwal
            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