GitHub user twdsilva opened a pull request: https://github.com/apache/phoenix/pull/34
Function Index This is my first cut at function based indexes. I need to add more tests and validate the expression that is supplied in the create index statement. Also In MetaDataEndpointImpl, I still have to set a default value for the expression string so that we don't need a script to update existing index definitions. I created a new visitor IndexColumnExpressionCompiler that checks if a parse node matches an expression in an index table and if there is a match evaluates the parse node as a column parse node. I modified SelectClauseVisitor, TrackOrderPreservingExpressionCompiler and WhereExpressionCompiler to extend IndexColumnExpressionCompiler. I have a test that tests using an expression in the SELECT, WHERE, ORDER BY and GROUP clauses and it seems to work correctly (the explain plan says the index is used). You can merge this pull request into a Git repository by running: $ git pull https://github.com/twdsilva/phoenix function-idx Alternatively you can review and apply these changes as the patch at: https://github.com/apache/phoenix/pull/34.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #34 ---- commit 9eefc9f896f472cf4d768bec71200c13f49833ed Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2014-12-11T21:35:35Z Initialial functional index impl Revert "Initialial functional index impl" This reverts commit 32fbcc0e7ce25d76d2f8b7d0205391e2b39e2fd4. Initialial functional index impl Fixed tests Added more tests more changes modified ExpressionIndexIT commit 86d37d978e5872d86cda7f46c593e655b47604c0 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-07T17:22:34Z Fix tests commit 160c0b98fa0e458a3e655a2d04eea1f69856ccc9 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-09T04:09:35Z Added more tests commit 88d574d6fa761c967f4ce0b2f19399dbc0fbcac3 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-09T23:49:11Z still more tests commit 776f3a9abfa84efb24aa02b6647b162c85d4db41 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-10T00:08:41Z Merge remote-tracking branch 'upstream/master' into function-idx Conflicts: phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java commit 13a5ffa1dc4c305288f0d0d1a96fbff1b9400679 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-14T08:31:46Z changed expression format in SYSTEM table from binary to string commit 1762ac268dc112f85d379ccd143887e60518c7a3 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-14T20:07:45Z fixed test commit 62ad630ac33d5c373ecdc2ba887cc58979d4422a Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-14T21:12:42Z Merge remote-tracking branch 'upstream/master' into function-idx Conflicts: phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java commit 3386b9c94154f914afd577b091aa216401c94d07 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-14T21:58:38Z revert unchanged files commit f1872a545b944d5cc3c34f38e1799da37b30d03d Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-14T22:18:16Z revert unchanged files commit d65bcb1540c3369d0379760a5794a9f2b2db47ef Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-14T22:20:04Z revert unchanged files commit 1dedf4bc0df8cc3a30b882b41ad33d134e3e103c Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-14T22:39:06Z minor edits commit 165db491f30906083f0fd51fb66ab04504e728f9 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-14T22:43:04Z minor edits commit 1e6a71b6a3396843c93d64f20bf563287b092ad8 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-15T00:19:03Z minor commit fb11a607fa8639fb25dff13e6eacbcfff516375d Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-15T00:52:30Z minor commit 1e9583a8a803aabcdd88f9978f8a6be1f33dec59 Author: Thomas D'Silva <twdsi...@gmail.com> Date: 2015-01-15T02:31:43Z minor ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---