[
https://issues.apache.org/jira/browse/PHOENIX-6434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17326919#comment-17326919
]
ASF GitHub Bot commented on PHOENIX-6434:
-----------------------------------------
kadirozde commented on a change in pull request #1194:
URL: https://github.com/apache/phoenix/pull/1194#discussion_r617877105
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/GlobalIndexRegionScanner.java
##########
@@ -263,7 +263,19 @@ public ImmutableBytesWritable
getLatestValue(ColumnReference ref, long ts) {
valuePtr.set(cell.getValueArray(), cell.getValueOffset(),
cell.getValueLength());
return valuePtr;
}
-
+ @Override
+ public KeyValue getLatestKeyValue(ColumnReference ref, long ts) {
+ List<Cell> cellList = put.get(ref.getFamily(), ref.getQualifier());
+ if (cellList == null || cellList.isEmpty()) {
+ return null;
+ }
+ Cell cell = cellList.get(0);
+ return new KeyValue(cell.getRowArray(), cell.getRowOffset(),
cell.getRowLength(),
Review comment:
Casting Cell as KeyValue does not work in all cases. It triggers an
HBase exception.
--
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]
> Secondary Indexes on PHOENIX_ROW_TIMESTAMP()
> --------------------------------------------
>
> Key: PHOENIX-6434
> URL: https://issues.apache.org/jira/browse/PHOENIX-6434
> Project: Phoenix
> Issue Type: Improvement
> Affects Versions: 5.1.0, 4.16.0
> Reporter: Kadir Ozdemir
> Priority: Major
> Attachments: PHOENIX-6434.4.x.001.patch, PHOENIX-6434.4.x.002.patch,
> PHOENIX-6434.4.x.003.patch, PHOENIX-6434.4.x.004.patch,
> PHOENIX-6434.master.001.patch
>
>
> PHOENIX-5629 introduced the function PHOENIX_ROW_TIMESTAMP() that returns the
> last modified time of a row. PHOENIX_ROW_TIMESTAMP() can be used as a
> projection column and referred in a WHERE clause. It is desirable to have
> indexes on row timestamps. This will result in fast time range queries.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)