Github user JamesRTaylor commented on a diff in the pull request:
https://github.com/apache/incubator-phoenix/pull/18#discussion_r10596154
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/parse/CastParseNode.java ---
@@ -40,14 +40,23 @@
private final PDataType dt;
- CastParseNode(ParseNode expr, String dataType) {
+ CastParseNode(ParseNode expr, String dataType, boolean arr) {
super(expr);
- dt =
PDataType.fromSqlTypeName(SchemaUtil.normalizeIdentifier(dataType));
+ if(arr == true) {
+ PDataType baseType =
PDataType.fromSqlTypeName(SchemaUtil.normalizeIdentifier(dataType));
+ dt = PDataType.fromTypeId(baseType.getSqlType() +
PDataType.ARRAY_TYPE_BASE);
+ } else {
+ dt =
PDataType.fromSqlTypeName(SchemaUtil.normalizeIdentifier(dataType));
+ }
}
- CastParseNode(ParseNode expr, PDataType dataType) {
- super(expr);
- dt = dataType;
+ CastParseNode(ParseNode expr, PDataType dataType, boolean arr) {
+ super(expr);
+ if (arr == true) {
--- End diff --
Actually, never mind. I was thinking this was an expression. This is fine
the way it is.
---
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.
---