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

Selecting an indexed array value from an uncovered column with local index returns NULL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.16.1, 5.2.0, 5.1.2
    • None
    • None

    Description

      Another one of these:

      > create table test1(pk1 integer not null primary key, v1 float, v2 float[10]);
      No rows affected (0.673 seconds)
      
      > create local index l2 on test1(v1);                       
      No rows affected (10.889 seconds)
      
      > upsert into test1 values(rand() * 10000000, rand(), ARRAY[rand(),rand(), rand()]);
      1 row affected (0.045 seconds)
      
      > select /*+ NO_INDEX */ v2[1] from test1 where v1 < 1;
      +-------------------+
      | ARRAY_ELEM(V2, 1) |
      +-------------------+
      | 0.49338496        |
      +-------------------+
      1 row selected (0.037 seconds)
      
      > select v2[1] from test1 where v1 < 1;
      +---------------------+
      | ARRAY_ELEM("V2", 1) |
      +---------------------+
      | null                |
      +---------------------+
      1 row selected (0.062 seconds)
      

       

      Attachments

        1. 6421-5.1.txt
          6 kB
          Lars Hofhansl

        Issue Links

          Activity

            People

              larsh Lars Hofhansl
              larsh Lars Hofhansl
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: