[ https://issues.apache.org/jira/browse/PHOENIX-6434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17319680#comment-17319680 ]
Lars Hofhansl commented on PHOENIX-6434: ---------------------------------------- Tried it and works. There's a funny thing I noticed (which happens *with or without* this issue): {code:java} > create table test2(pk1 integer not null primary key, x.v1float, y.v2 float, > z.v3 float); No rows affected (1.418 seconds) > upsert into test2 values(rand() * 100000000, rand(), rand(), rand()); 1 row affected (0.185 seconds) > select * from test2 order by > phoenix_row_timestamp();+----------+------+------------+-----------+ | PK1 | V1 | V2 | V3 | +----------+------+------------+-----------+ | 48717214 | null | 0.54710484 | 0.8657283 | +----------+------+------------+-----------+ 1 row selected (0.06 seconds) -- Note how v1 is NULL! > select v1 from test2 order by phoenix_row_timestamp(); +-----------+ | V1 | +-----------+ | 0.3282114 | +-----------+ 1 row selected (0.023 seconds) {code} > 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-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)