You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/11/24 13:18:57 UTC

[GitHub] [hive] kgyrtkirk commented on a change in pull request #2678: HIVE-25566: Show column constraints for "DESC FORMATTED TABLE"

kgyrtkirk commented on a change in pull request #2678:
URL: https://github.com/apache/hive/pull/2678#discussion_r756064798



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java
##########
@@ -129,7 +168,7 @@ private void addPartitionTransformData(DataOutputStream out, Table table, boolea
     out.write(partitionTransformOutput.getBytes(StandardCharsets.UTF_8));
   }
 
-  private void addStatsData(DataOutputStream out, String columnPath, List<FieldSchema> columns, boolean isFormatted,
+  private void addStatsData(DataOutputStream out, String columnPath, Table table, List<FieldSchema> columns, boolean isFormatted,

Review comment:
       I think it would possibly be beneficial to put the constraint info into the `FieldSchema` itself in some usable way ...not sure what would be the earliest point we could set it but it could make constraint info more accessible...
   
   maybe return with a non-thrift `FieldSchema` from the `Table` which is constriant aware?
   
   we are always making circles because data is not where it supposed to be...

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/ShowUtils.java
##########
@@ -132,11 +132,11 @@ public static void appendNonNull(StringBuilder builder, Object value, boolean fi
   }
 
 
-  public static String[] extractColumnValues(FieldSchema column, boolean isColumnStatsAvailable,
+  public static String[] extractColumnValues(FieldSchema column, String colConstraint, boolean isColumnStatsAvailable,

Review comment:
       can we keep a method with the old signature as well?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org