phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samarthjain <...@git.apache.org>
Subject [GitHub] phoenix pull request: Phoenix 1759
Date Thu, 16 Apr 2015 16:35:54 GMT
Github user samarthjain commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/68#discussion_r28526230
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/schema/types/PhoenixArray.java
---
    @@ -561,6 +666,23 @@ public int estimateByteSize(int pos) {
     		}
     		
     		@Override
    +		public String toString() {
    +			StringBuilder sb = new StringBuilder(TO_STRING_BEGIN);
    +			boolean isFirst = true;
    +			final Format defaultFormat = null;
    +			for (Byte o : byteArr) {
    +				if (isFirst) {
    +					isFirst = false;
    +				} else {
    +					sb.append(TO_STRING_SEPARATOR);
    +				}
    +				sb.append(this.baseType.toStringLiteral(o, defaultFormat));
    --- End diff --
    
    Looks like the defaultFormat is always null. How about having a new method toStringLiteral(o)
which delegates to toStringLiteral(o, defaultFormat) where defaultFormat is null? 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message