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

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

Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/34#discussion_r23668433
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/parse/ColumnParseNode.java ---
    @@ -40,6 +41,13 @@ public ColumnParseNode(TableName tableName, String name, 
String alias) {
             this.tableName = tableName;
             fullName = tableName == null ? getName() : tableName.toString() + 
QueryConstants.NAME_SEPARATOR + getName();
         }
    +    
    +    public ColumnParseNode(TableName tableName, String name, String alias, 
boolean caseSensitive) {
    --- End diff --
    
    We should be able to store the expressionStr for a functional index in a 
case sensitive manner. You'll get this for free when you parse and compile the 
functional expression. If a referenced column is not surrounded with double 
quotes, then it'll be upper cased, otherwise it won't. Then the equality check 
will always be a straight equals check.


> Support functional indexes
> --------------------------
>
>                 Key: PHOENIX-514
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-514
>             Project: Phoenix
>          Issue Type: Task
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>              Labels: enhancement
>
> Instead of only defining the set of columns from the data table that make up 
> an index, you should be able to use expressions.  For example:
>       CREATE INDEX upper_last_name_idx ON person (UPPER(last_name))
> Then in queries that use UPPER(last_name), we can replace them with column 
> references to the index table.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to