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

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_r616124570



##########
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:
       There is a check in MetaDataClient#createIndex(), which does not allow 
non-deterministic expressions in index and considers that anything other than 
Determinism.ALWAYS is non-deterministic. This does not seem right. SQL Server 
agrees with me "Deterministic functions always return the same result any time 
they are called with a specific set of input values and given the same state of 
the database. Nondeterministic functions may return different results each time 
they are called with a specific set of input values even if the database state 
that they access remains the same. For example, the function AVG always returns 
the same result given the qualifications stated above, but the GETDATE 
function, which returns the current datetime value, always returns a different 
result." Maybe I need to change the create index code to allow PER_ROW 
determinism too. What do you say?




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