twdsilva commented on a change in pull request #541: PHOENIX-4893 Move parent
column combining logic of view and view inde…
URL: https://github.com/apache/phoenix/pull/541#discussion_r303634592
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
##########
@@ -1156,37 +779,29 @@ private void addColumnToTable(List<Cell> results, PName
colName, PName famName,
throw new IllegalStateException("Didn't find all required key
values in '"
+ colName.getString() + "' column metadata row");
}
-
+
Cell columnSizeKv = colKeyValues[COLUMN_SIZE_INDEX];
Integer maxLength =
columnSizeKv == null ? null :
PInteger.INSTANCE.getCodec().decodeInt(
- columnSizeKv.getValueArray(),
columnSizeKv.getValueOffset(), SortOrder.getDefault());
+ columnSizeKv.getValueArray(),
columnSizeKv.getValueOffset(), SortOrder.getDefault());
Cell decimalDigitKv = colKeyValues[DECIMAL_DIGITS_INDEX];
Integer scale =
decimalDigitKv == null ? null :
PInteger.INSTANCE.getCodec().decodeInt(
- decimalDigitKv.getValueArray(),
decimalDigitKv.getValueOffset(), SortOrder.getDefault());
+ decimalDigitKv.getValueArray(),
decimalDigitKv.getValueOffset(), SortOrder.getDefault());
Cell ordinalPositionKv = colKeyValues[ORDINAL_POSITION_INDEX];
int position =
-
PInteger.INSTANCE.getCodec().decodeInt(ordinalPositionKv.getValueArray(),
- ordinalPositionKv.getValueOffset(),
SortOrder.getDefault()) + (isSalted ? 1 : 0);;
+
PInteger.INSTANCE.getCodec().decodeInt(ordinalPositionKv.getValueArray(),
+ ordinalPositionKv.getValueOffset(),
SortOrder.getDefault()) + (isSalted ? 1 : 0);
+ ;
- // Prior to PHOENIX-4766 we were sending the parent table column
metadata while creating a
Review comment:
We cannot ignore parent table columns while building the PTable of a child
view as its possible this call is from an older client. For a new client
duplicate parent table columns will be resolved by picking the one with the
latest timestamp.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services