Github user HeartSaVioR commented on the issue:
https://github.com/apache/storm/pull/1714
@arunmahadevan
Let me summary regarding nested map/array support.
* accessing nested element in nested map/array works without modifying
Calcite.
* it should be defined as ANY. Specifying MAP's value type to MAP doesn't
seem to work. I don't understand this behavior but it works anyway.
* We need to wrap value with CAST if we need to use value in expression.
* For example, `MAPFIELD['a'] = 2` doesn't work but `CAST(MAPFIELD['a']
AS INTEGER) = 2` works.
* Using value in projection (fields of SELECT) doesn't need to be wrapped
with CAST.
* NOTE: this is NOT a safe operation, and errors are shown in runtime.
* If value is null in any chance, comparing it to other will **throw
RuntimeException** in runtime.
* value itself could be null.
* value could be null when we access array with wrong index or map with
non-exist key.
* If we access array with index out of bound, it will **throw
ArrayIndexOutOfBoundException** in runtime.
So there's a way to support current feature with adding some inconveniences
(CAST), but it is no longer safe operation. Since user can't handle errors
manually, this can make worker continuously crashed.
I asked Calcite dev. group about this and didn't get answer yet.
---
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.
---