Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2206

Math function called with PK column ignores WHERE clause

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.5.0
    • Fix Version/s: 4.6.0, 4.5.2
    • Component/s: None
    • Labels:

      Description

      A WHERE condition that uses a scalar function such as EXP is ignored and all rows are returned.

      create table test (id integer primary key) ;
      upsert into test values (1) ;
      upsert into test values (2) ;
      upsert into test values (3) ;
      upsert into test values (4) ;
      upsert into test values (5) ;
      select ID, exp(ID) from test where exp(ID) < 10 ;

      Result is:
      1 2.718281828459045
      2 7.38905609893065
      3 20.085536923187668
      4 54.598150033144236
      5 148.4131591025766

        Attachments

        1. PHOENIX-2206_v2.patch
          4 kB
          James R. Taylor
        2. PHOENIX-2206.patch
          4 kB
          James R. Taylor

          Activity

            People

            • Assignee:
              jamestaylor James R. Taylor
              Reporter:
              ckran ckran
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: