[
https://issues.apache.org/jira/browse/PHOENIX-4816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16547070#comment-16547070
]
James Taylor edited comment on PHOENIX-4816 at 7/17/18 8:32 PM:
----------------------------------------------------------------
By default, Phoenix will use 2 byes to encode the column qualifier for each
column you have in your table (see
[http://phoenix.apache.org/columnencoding.html]). Phoenix can then optimize the
lookup of the HBase Cell by using the column qualifier as a index into the
List<Cell> during filtering by HBase. In theory, when you use dynamic columns,
this optimization should be turned off since you're essentially supplying
column qualifier names directly when you use this feature. Looks like there's a
bug here, though.
Workaround would be to turn off column encoding for your table (add
COLUMN_ENCODED_BYTES=NONE to your DDL statement). Another couple of things to
consider for your use case:
* Use our VIEW mechanism instead of dynamic columns so that Phoenix tracks the
columns for each view (you can create these views on-the-fly: they are very low
overhead).
* Declare your base table as IMMUTABLE (i.e. CREATE IMMUTABLE TABLE ...) if
possible (i.e. rows are never modified in-place, but only inserted as new rows)
as you'll have numerous performance benefits around doing that.
was (Author: jamestaylor):
By default, Phoenix will use 2 byes to encode the column qualifier for each
column you have in your table (see
http://phoenix.apache.org/columnencoding.html). Phoenix can then optimize the
lookup of the HBase Cell by using the column qualifier as a index into the
List<Cell> during filtering by HBase. In theory, when you use dynamic columns,
this optimization should be turned off since you're essentially supplying
column qualifier names directly when you use this feature. Looks like there's a
bug here, though.
Workaround would be to turn off column encoding for your table (add
COLUMN_ENCODED_BYTES=NONE to your DDL statement). Another couple of things to
consider for your use case:
* Use our VIEW mechanism instead of dynamic columns so that Phoenix tracks the
columns for each view (you can create these views on-the-fly: they are very low
overhead).
* Declare your base table as IMMUTABLE (i.e. CREATE IMMUTABLE TABLE ...) as
you'll have numerous performance benefits around doing that.
> When select dynamic columns throw InvalidQualifierBytesException
> ----------------------------------------------------------------
>
> Key: PHOENIX-4816
> URL: https://issues.apache.org/jira/browse/PHOENIX-4816
> Project: Phoenix
> Issue Type: Bug
> Reporter: cherish peng
> Priority: Blocker
> Labels: dynamic-schema
> Original Estimate: 336h
> Remaining Estimate: 336h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)