[ https://issues.apache.org/jira/browse/HIVE-25566?focusedWorklogId=691274&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-691274 ]
ASF GitHub Bot logged work on HIVE-25566: ----------------------------------------- Author: ASF GitHub Bot Created on: 06/Dec/21 18:28 Start Date: 06/Dec/21 18:28 Worklog Time Spent: 10m Work Description: 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-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 691274) Time Spent: 50m (was: 40m) > Show column constraints for "DESC FORMATTED TABLE" > -------------------------------------------------- > > Key: HIVE-25566 > URL: https://issues.apache.org/jira/browse/HIVE-25566 > Project: Hive > Issue Type: New Feature > Reporter: Soumyakanti Das > Assignee: Soumyakanti Das > Priority: Minor > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > Currently, column constraints are not shown with the data type of columns. > They are shown all together at the end, but showing them with the data type > will make the description more readable. > > Example: > Create table > > {code:java} > CREATE TABLE TEST( > col1 varchar(100) NOT NULL COMMENT "comment for column 1", > col2 timestamp DEFAULT CURRENT_TIMESTAMP() COMMENT "comment for column 2", > col3 decimal, > col4 varchar(512) NOT NULL, > col5 varchar(100), > primary key(col1, col2) disable novalidate) > ROW FORMAT SERDE > 'org.apache.hadoop.hive.ql.io.orc.OrcSerde' > STORED AS INPUTFORMAT > 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' > OUTPUTFORMAT > 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'; > {code} > > Currently, {{DESC FORMATTED TABLE }} returns, > {code:java} > # col_name data_type comment > col1 varchar(100) comment for column 1 > col2 timestamp comment for column 2 > col3 decimal(10,0) > col4 varchar(512) > col5 varchar(100) > # Detailed Table Information > Database: default > #### A masked pattern was here #### > Retention: 0 > #### A masked pattern was here #### > Table Type: MANAGED_TABLE > Table Parameters: > COLUMN_STATS_ACCURATE > {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\",\"col4\":\"true\",\"col5\":\"true\"}} > bucketing_version 2 > numFiles 0 > numRows 0 > rawDataSize 0 > totalSize 0 > #### A masked pattern was here #### > # Storage Information > SerDe Library: org.apache.hadoop.hive.ql.io.orc.OrcSerde > InputFormat: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat > OutputFormat: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat > > Compressed: No > Num Buckets: -1 > Bucket Columns: [] > Sort Columns: [] > Storage Desc Params: > serialization.format 1 > # Constraints > # Primary Key > Table: default.test > Constraint Name: #### A masked pattern was here #### > Column Name: col1 > Column Name: col2 > # Not Null Constraints > Table: default.test > Constraint Name: #### A masked pattern was here #### > Column Name: col1 > Constraint Name: #### A masked pattern was here #### > Column Name: col4 > # Default Constraints > Table: default.test > Constraint Name: #### A masked pattern was here #### > Column Name:col2 Default Value:CURRENT_TIMESTAMP() > {code} > > Adding the column constraints will look something like, > {code:java} > # col_name data_type > comment > col1 varchar(100) PRIMARY KEY NOT NULL > comment for column 1 > col2 timestamp PRIMARY KEY DEFAULT CURRENT_TIMESTAMP() > comment for column 2 > col3 decimal(10,0) > col4 varchar(512) NOT NULL > col5 varchar(100) > # Detailed Table Information > Database: default > #### A masked pattern was here #### > Retention: 0 > #### A masked pattern was here #### > Table Type: MANAGED_TABLE > Table Parameters: > COLUMN_STATS_ACCURATE > {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"col1\":\"true\",\"col2\":\"true\",\"col3\":\"true\",\"col4\":\"true\",\"col5\":\"true\"}} > bucketing_version 2 > numFiles 0 > numRows 0 > rawDataSize 0 > totalSize 0 > #### A masked pattern was here #### > # Storage Information > SerDe Library: org.apache.hadoop.hive.ql.io.orc.OrcSerde > InputFormat: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat > OutputFormat: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat > > Compressed: No > Num Buckets: -1 > Bucket Columns: [] > Sort Columns: [] > Storage Desc Params: > serialization.format 1 > # Constraints > # Primary Key > Table: default.test > Constraint Name: #### A masked pattern was here #### > Column Name: col1 > Column Name: col2 > # Not Null Constraints > Table: default.test > Constraint Name: #### A masked pattern was here #### > Column Name: col1 > Constraint Name: #### A masked pattern was here #### > Column Name: col4 > # Default Constraints > Table: default.test > Constraint Name: #### A masked pattern was here #### > Column Name:col2 Default Value:CURRENT_TIMESTAMP() > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001)