Github user arunmahadevan commented on a diff in the pull request:
https://github.com/apache/storm/pull/1714#discussion_r80416478
--- Diff:
external/sql/storm-sql-core/src/test/org/apache/storm/sql/compiler/TestCompilerUtils.java
---
@@ -153,6 +158,29 @@ public static CalciteState sqlOverNestedTable(String
sql)
.field("MAPFIELD", SqlTypeName.ANY)
.field("NESTEDMAPFIELD", SqlTypeName.ANY)
.field("ARRAYFIELD", SqlTypeName.ANY)
+
+ // TODO: replace field definitions with belows while
Calcite can handle properly
--- End diff --
Defining multi-level nest maps with types at each level is tedious for the
user. The current approach is to define the column as ANY (like Object) and do
unchecked type cast in the generated code. While this may produce class cast
runtime exception if the value type doesn't match, its more convenient syntax
when the value types are going to match. Like I mentioned in earlier comment,
we could try to keep the current syntax for CAST with our own logic to support
multi-level maps / arrays until we find a more intuitive way to support it via
calcite.
---
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.
---