GitHub user HeartSaVioR opened a pull request:
https://github.com/apache/storm/pull/1714
STORM-2125 Use Calcite's implementation of Rex Compiler
Note: This patch is on top of STORM-2089.
This can cover STORM-2111(#1704), STORM-2113(#1707), STORM-2114,
STORM-2116(#1709).
* Upgrade Calcite to latest 1.9.0
* borrow JaninoRexCompiler and modify to return Expression instead of
Scalar (RexNodeToBlockStatementCompiler)
* since we need to pass code block to Bolts, not executable method
implementation on classloader
* modify codebase to use RexNodeToBlockStatementCompiler
* add some feature validation unit tests
* remove ExprCompiler and its test
Btw, Calcite Rex Compiler assigns the result of ITEM() to Object, so
comparing result to other constant just fails. CAST() works but if any of the
result of ITEM() is null or out of bound (array), it throws Exception at
runtime. So only using them to select field would be safe.
I sent a mail to Calcite dev to ask this strange behavior, but I think it's
not a big matter so even though it can't be fixed, I would like to document it
as limitation and drop that feature.
@arunmahadevan Please review and comment, and also please comment what do
you think about above behavior. Thanks in advance.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HeartSaVioR/storm STORM-2125
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/1714.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 #1714
----
commit 4b69c077a1f477e06049aa97bd127fc1b2786c21
Author: Jungtaek Lim <[email protected]>
Date: 2016-09-13T02:40:13Z
STORM-2089 Replace Consumer of ISqlTridentDataSource with SqlTridentConsumer
* SqlTridentConsumer contains StateFactory and StateUpdater which is needed
to store tuples to State via batch
* Apply the change to storm-sql-kafka
* move out JsonScheme and JsonSerializer to runtime
* it will be used from other external sql modules
* add javadoc to ISqlTridentDataSource
commit 2fa4c95ff1ecb3cab9c09c25ef08a4faa21905e2
Author: Jungtaek Lim <[email protected]>
Date: 2016-09-22T06:38:44Z
STORM-2125 Use Calcite's implementation of Rex Compiler
* Upgrade Calcite to latest 1.9.0
* borrow JaninoRexCompiler and modify to return Expression instead of
Scalar (RexNodeToBlockStatementCompiler)
* since we need to pass code block to Bolts, not executable method
implementation on classloader
* modify codebase to use RexNodeToBlockStatementCompiler
* add some feature validation unit tests
* remove ExprCompiler and its test
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---