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/09/27 23:28:30 UTC

[GitHub] [hive] soumyakanti3578 opened a new pull request #2678: HIVE-25566: Show column constraints for "DESC FORMATTED TABLE"

soumyakanti3578 opened a new pull request #2678:
URL: https://github.com/apache/hive/pull/2678


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   Column constraints are added with the data type to increase readability.
   
   
   ### Why are the changes needed?
   Improves readability.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   mvn test  -Dtest=TestMiniLlapLocalCliDriver -Dtest.output.overwrite=true -Dqfile=show_create_table.q
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [hive] soumyakanti3578 closed pull request #2678: HIVE-25566: Show column constraints for "DESC FORMATTED TABLE"

Posted by GitBox <gi...@apache.org>.
soumyakanti3578 closed pull request #2678:
URL: https://github.com/apache/hive/pull/2678


   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
kgyrtkirk commented on pull request #2678:
URL: https://github.com/apache/hive/pull/2678#issuecomment-977858142


   is this PR still a draft?


-- 
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