phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-514) Support functional indexes
Date Mon, 02 Feb 2015 23:58:35 GMT

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

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

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

    https://github.com/apache/phoenix/pull/34#discussion_r23971181
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/parse/LiteralParseNode.java ---
    @@ -80,4 +80,35 @@ public boolean isStateless() {
         public String toString() {
             return type == PVarchar.INSTANCE ? ("'" + value.toString() + "'") : value ==
null ? "null" : value.toString();
         }
    +
    +	@Override
    +	public int hashCode() {
    +		final int prime = 31;
    +		int result = 1;
    +		result = prime * result + ((type == null) ? 0 : type.hashCode());
    +		result = prime * result + ((value == null) ? 0 : value.hashCode());
    +		return result;
    +	}
    +
    +	@Override
    +	public boolean equals(Object obj) {
    +		if (this == obj)
    +			return true;
    +		if (obj == null)
    +			return false;
    +		if (getClass() != obj.getClass())
    +			return false;
    +		LiteralParseNode other = (LiteralParseNode) obj;
    +		if (type == null) {
    --- End diff --
    
    Fixed equals()


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

Mime
View raw message