[ 
https://issues.apache.org/jira/browse/PHOENIX-3127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15398860#comment-15398860
 ] 

Sergey Soldatov commented on PHOENIX-3127:
------------------------------------------

I see. Actually code from SchemaUtil made me puzzled. We check whether list of 
CFs is empty and in this case return default CF if it's set. Otherwise we 
return first CF.  More logical would be checking for default CF first and 
return first from the list if it's not set. Why the question raised, people 
tried to improve performance according to the documentation placing some 
columns to the same CF but didn't notice any improvement and digging in found 
that scan is going for both CFs they have. We need to document it somewhere. 

> 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)

Reply via email to