Github user JamesRTaylor commented on a diff in the pull request:
https://github.com/apache/incubator-phoenix/pull/8#discussion_r10156877
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/schema/PhoenixArray.java ---
@@ -143,6 +147,24 @@ public int estimateByteSize(int pos) {
return this.baseType.toBytes(((Object[])array)[pos]);
}
+ public boolean isNull(int pos) {
+ if(this.baseType.toBytes(((Object[])array)[pos]).length == 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public void setMaxLength(Integer maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ // Returns null for all cases. For CHAR_ARRAY returns the max length
associated with the
--- End diff --
It's not just CHAR_ARRAY. It's any array with a fixed width but with a
getByteSize() of null. Don't special case based on the type unless there's no
other way. For example, the space padding *only* applied to a CHAR_ARRAY, so
that's ok.
---
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.
---