You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Viraj Jasani (Jira)" <ji...@apache.org> on 2025/07/07 22:36:00 UTC
[jira] [Resolved] (PHOENIX-7654) Restrict BSON datatype in composite PK as last part of the pk column
[ https://issues.apache.org/jira/browse/PHOENIX-7654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Viraj Jasani resolved PHOENIX-7654.
-----------------------------------
Resolution: Fixed
> Restrict BSON datatype in composite PK as last part of the pk column
> --------------------------------------------------------------------
>
> Key: PHOENIX-7654
> URL: https://issues.apache.org/jira/browse/PHOENIX-7654
> Project: Phoenix
> Issue Type: Bug
> Reporter: Rahul Kumar
> Assignee: Rahul Kumar
> Priority: Major
> Fix For: 5.3.0
>
>
> Since converting BSON to byte array will have entries of {{x00}} bytes which is treated as SEPERATOR in reading RowKeyValueAccessor, it will not read the values correctly from table where BSON is composite PK other than last part of rowkey
> We should improve is visibility into this by throwing Exception like below where if someone tries to use VARBINARY as anywhere in composite pk other than only last part of the pk column, we throw below Exception. BSON also deserves similar Exception.
>
> VARBINARY_IN_ROW_KEY(1005, "42J03", "The VARBINARY/ARRAY type can only be used as the last part of a multi-part row key. " + "For Binary types, you can use VARBINARY_ENCODED for early part of multi-part row key."),
>
> We should restrict creating any INDEX on BSON and also, enforce BSON as composite PK as last part of the pk column.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)