[ 
https://issues.apache.org/jira/browse/PHOENIX-6434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17325404#comment-17325404
 ] 

ASF GitHub Bot commented on PHOENIX-6434:
-----------------------------------------

lhofhansl commented on a change in pull request #1194:
URL: https://github.com/apache/phoenix/pull/1194#discussion_r616270883



##########
File path: 
phoenix-core/src/main/java/org/apache/phoenix/expression/function/PhoenixRowTimestampFunction.java
##########
@@ -124,7 +127,7 @@ public boolean isStateless() {
 
     @Override
     public Determinism getDeterminism() {
-        return Determinism.PER_ROW;
+        return Determinism.ALWAYS;

Review comment:
       Hmm... Interesting. If you do a transaction (or query) over 1000 rows 
you would not expect that PHOENIX_ROW_TIMESTAMP() returning the same one value, 
so ALWAYS seems wrong.
   
   Doing a git blame it looks like I, myself, added PER_INVOCATION with 
PHOENIX-1516, prior to that there was only ROW, STATEMENT, and ALWAYS.
   
   I agree with you that indexes should be fine with PER_ROW and ALWAYS 
determinism.
   PER_INVOCATION should be disallowed. Not 100% sure about PER_STATEMENT, 
seems that would cause problems. It is possible that some function are 
incorrectly labeled, though, we do not seems to follow that logic correctly.
   




-- 
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)

Reply via email to