kadirozde commented on a change in pull request #701: PHOENIX-5709 Simplify
index update generation code for consistent glo…
URL: https://github.com/apache/phoenix/pull/701#discussion_r376885141
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
##########
@@ -1592,7 +1592,7 @@ private int estimateIndexRowKeyByteSize(int
indexColByteSize) {
*/
private void initCachedState() {
byte[] emptyKvQualifier =
EncodedColumnsUtil.getEmptyKeyValueInfo(encodingScheme).getFirst();
- dataEmptyKeyValueRef = new
ColumnReference(emptyKeyValueCFPtr.copyBytesIfNecessary(), emptyKvQualifier);
+ dataEmptyKeyValueRef = new ColumnReference(dataEmptyKeyValueCF,
emptyKvQualifier);
Review comment:
@gokceni, if you look at a bit further, you would see the other constructor
sets only two attributes while IndexMaintainer has tens of attributes. That
constructor is not by itself sufficient to initialize an IndexMaintainer
object. It is used to get a starting object then the rest of the attributes is
set by the caller of this constructor. So, even if this constructor is used,
dataEmptyKeyValueCF is initialized at the end.
----------------------------------------------------------------
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