Github user navis commented on a diff in the pull request: https://github.com/apache/phoenix/pull/124#discussion_r42825749 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java --- @@ -459,19 +459,30 @@ public static ColumnInfo getColumnInfo(PTable table, String columnName) throws S return getColumnInfo(pColumn); } - /** + /** * Constructs a column info for the supplied pColumn * @param pColumn * @return columnInfo * @throws SQLException if the parameter is null. */ public static ColumnInfo getColumnInfo(PColumn pColumn) throws SQLException { - if (pColumn==null) { + if (pColumn == null) { throw new SQLException("pColumn must not be null."); } int sqlType = pColumn.getDataType().getSqlType(); - ColumnInfo columnInfo = new ColumnInfo(pColumn.toString(),sqlType); - return columnInfo; + if (pColumn.getMaxLength() == null) { + return new ColumnInfo(pColumn.toString(), sqlType); + } + if (sqlType == Types.CHAR || sqlType == Types.VARCHAR) { --- End diff -- @JamesRTaylor How about to move the logic above into PColumn? Then we can access full information in it.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---