Samarth Jain created PHOENIX-2796:
-------------------------------------
Summary: Remove unnecessary code for handling array data type
Key: PHOENIX-2796
URL: https://issues.apache.org/jira/browse/PHOENIX-2796
Project: Phoenix
Issue Type: Bug
Reporter: Samarth Jain
[~ram_krish][~Dumindux] - In BaseScannerRegionObserver, I am seeing this piece
of code which is buggy and is not serving any purpose either. The bug is that
it ends up removing the wrong key value from the result in result.remove(idx).
Step through the code when you are running
ArrayIT#testServerArrayElementProjection2 as an example.
FWIW, I commented it out and the tests in ArrayIT all passed. Can you guys
please check?
{code}
for (KeyValueColumnExpression kvExp : arrayKVRefs) {
if (kvExp.evaluate(tuple, ptr)) {
for (int idx = tuple.size() - 1; idx >= 0; idx--) {
Cell kv = tuple.getValue(idx);
if (Bytes.equals(kvExp.getColumnFamily(), 0,
kvExp.getColumnFamily().length,
kv.getFamilyArray(), kv.getFamilyOffset(),
kv.getFamilyLength())
&& Bytes.equals(kvExp.getColumnName(), 0,
kvExp.getColumnName().length,
kv.getQualifierArray(),
kv.getQualifierOffset(), kv.getQualifierLength())) {
// remove the kv that has the full array values.
result.remove(idx);
break;
}
}
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)