[
https://issues.apache.org/jira/browse/PHOENIX-514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294843#comment-14294843
]
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_r23670722
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/expression/Expression.java ---
@@ -88,4 +88,9 @@
* @return
*/
boolean requiresFinalEvaluation();
+
+ /**
+ * @return the estimated size in bytes of the expression when
serialized
+ */
+ int getEstimatedByteSize();
--- End diff --
I think this may not be worth adding, as the more methods we have here, the
higher the burden of adding new expressions. The only place we use this is for
the IndexMaintainer to serialize it's bytes (true?), but we'll likely move
toward Protobufs in the next major release. Could we have a crude estimate
instead? Maybe based on total number of expressions in the tree (which we could
track in ExpressionCompiler in this method (by just have a totalNodeCount
member variable, incrementing it here by one, and resetting it to zero in
reset()):
@Override
public void addElement(List<Expression> l, Expression element) {
nodeCount--;
l.add(element);
}
Thoughts?
> 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)