You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/11/05 17:11:58 UTC

[GitHub] [phoenix] alejandro-anadon commented on pull request #1342: PHOENIX-6583 Inserting explicit Null into a (fixed length) binary field is stored as an array of zeroes

alejandro-anadon commented on pull request #1342:
URL: https://github.com/apache/phoenix/pull/1342#issuecomment-962069545


   Hi,
   
   I think that I solved. I forget to check ptr. Before I was checking only for the Object. In my test, now is not having failures.
   
   But now, I found something that for me is streange. I tested it not only with fixed binaries, but algo with integers. At the begining I thought that it was bacause my fixed; so I proved without my changes. But I had the same result, so I thing that it is not because of my changes and it comes before.
   
   The question is that it seems that there is a conflict between "field is null" and "filed=null". It is supoused that the result should be the same; but it is not. Followin is what I mean (you can try in master branch without my changes):
   
   0: jdbc:phoenix:> create table  DUMMY (id integer not null, int2 INTEGER, text varchar(255), testbin binary(16), CONSTRAINT pk primary key (id));
   No rows affected (2.478 seconds)
   
   
   0: jdbc:phoenix:> upsert into dummy values (1);
   1 row affected (0.055 seconds)
   
   0: jdbc:phoenix:> select * from dummy;
   +----+------+------+---------+
   | ID | INT2 | TEXT | TESTBIN |
   +----+------+------+---------+
   | 1  | null |      |         |
   +----+------+------+---------+
   1 row selected (0.039 seconds)
   
   0: jdbc:phoenix:> select * from dummy where int2 is null;
   +----+------+------+---------+
   | ID | INT2 | TEXT | TESTBIN |
   +----+------+------+---------+
   | 1  | null |      |         |
   +----+------+------+---------+
   1 row selected (0.03 seconds)
   
   0: jdbc:phoenix:> select * from dummy where int2=null;
   +----+------+------+---------+
   | ID | INT2 | TEXT | TESTBIN |
   +----+------+------+---------+
   +----+------+------+---------+
   No rows selected (0.033 seconds)
   
   
   "select * from dummy where int2 is null;" should returns the same as "select * from dummy where int2=null;". should't ?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org