[
https://issues.apache.org/jira/browse/PHOENIX-3127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15398832#comment-15398832
]
James Taylor commented on PHOENIX-3127:
---------------------------------------
It's by design, but I can see your point (was confused myself before in the
same way). The default column family is used as container for unprefixed
columns. The empty/dummy cell is always placed in the first column family
declared in the create table statement. It's possible that the default column
family refers to a column family that doesn't exist. We needed a uniform way of
always being able to find the column family containing the empty cell, so this
was the easiest way. FWIW, we have util methods in SchemaUtil that'll return
the empty column family if that's helpful.
> EmptyFamilyName uses the first family name instead of the default one.
> ----------------------------------------------------------------------
>
> Key: PHOENIX-3127
> URL: https://issues.apache.org/jira/browse/PHOENIX-3127
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.4.0, 4.7.0
> Reporter: Sergey Soldatov
>
> The CF for dummy keys is unpredictable. When we create table like:
> {{create table x (id integer primary key, A.i1 integer, B.i2 integer)
> DEFAULT_COLUMN_FAMILY='B';}}
> the dummy keys have column family 'A'.
> In the case
> {{create table x (id integer primary key, i1 integer, A.i2 integer, B.i3
> integer) DEFAULT_COLUMN_FAMILY='B';}}
> the dummy keys have column family 'B'
> This happen because we takes the value for EmptyFamilyName from the first CF
> if we have any. In first case the list of CFs will be 'A', 'B'. In the second
> case since i1 will use default CF which is 'B', the list will be 'B', 'A'.
> Is it by design or we should use DEFAULT_COLUMN_FAMILY for the dummy keys if
> it's provided during table creation?
> Fix can be easy, but it may affects the backward compatibility.
> Any thoughts [~jamestaylor] ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)