One of our customer struggling Phoenix dropping some Characters on what is especially a Primary Key. For some reason when they write to Phoenix its dropping a leading character and they can’t seem to figure out why.
@Maharaj Muthusamy I notice your table has 6 columns but your select output has 7 columns. Is this just a oversight when creating the document? I'm not suggesting it has anything to do with the error.
FYI, The integer, bigint data types in Phoenix flip the sign bit. Weird design choice! From the Phoenix docs:
"The binary representation is an 8 byte long with the sign bit flipped (so that negative values sorts before positive values)."
In the select output 123, USA is the value in add_line_1 . I think it appears like two columns in the output. The select output has only 7 columns.
I think you're issue is that you're using bigint in Hive mapped to Phoenix bigint whereas in Phoenix you should map to unsigned_long instead. It should be an easy test, just test by changing your Pat_ID to unsigned_long. https://phoenix.apache.org/language/datatypes.html