[ https://issues.apache.org/jira/browse/PHOENIX-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Samarth Jain updated PHOENIX-3666: ---------------------------------- Attachment: PHOENIX-3666_wip.patch This turned out to be trickier than I anticipated. Essentially, I wanted to make sure that we are able to use all the different column mapping schemes which turned up an issue in the way we are hardcoding "reserved" column qualifiers. To help resolve this, I thought serializing the encoding scheme in ProjectedColumnExpressions would help but unfortunately that was a dark abyss. We generate various column expressions using intermediate PTable representations that don't (and can't) have the right encoding schemes in them. This took me down the path of attempting to use the right encoding scheme when we deserialize the expressions on the server side. But that made the code really fragile as we serialize expressions everywhere and having to fix the scheme in all those places was just ugly. I ultimately decided to hard code the reserved column qualifiers (range 1-10) to be serialized using ONE_BYTE_QUALIFIER scheme. I also relaxed the constraints in the encoding schemes to decode byte arrays of size 1 with the ONE_BYTE_QUALIFIER encoding/decoding scheme. A side effect of this change is that the EncodedColumnQualifierCellsList is no longer sorted wrt column qualifiers. This is because a one byte qualifier representation of 0 lexicographically sorts after lets say a 4 byte qualifier representation 11. As a result I need to sort the array of cells before creating a ResultTuple out of it. I am parking this patch as wip since I only want to do the sorting when needed. All tests pass with this patch though. > Make use of EncodedColumnQualifierCellsList for all column name mapping > schemes > ------------------------------------------------------------------------------- > > Key: PHOENIX-3666 > URL: https://issues.apache.org/jira/browse/PHOENIX-3666 > Project: Phoenix > Issue Type: Sub-task > Reporter: Samarth Jain > Assignee: Samarth Jain > Attachments: PHOENIX-3666_wip.patch > > -- This message was sent by Atlassian JIRA (v6.3.15#6346)