Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Comments not available for Hive struct type.
Labels:
- Labels:
-
Apache Hive
New Contributor
Created ‎10-05-2022 06:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A comment may be specified for the structure type for the URL link.
CREATE EXTERNAL TABLE IF NOT EXISTS test_db.test_table ( `id` string comment 'id', `name` string comment 'name', `area` struct<`country`: string comment 'test country, `address`:string comment 'test address> comment 'test struct' );
The 'test country' and 'test address' comment of the area struct does not apply.
The 'test structure' comment has been properly applied.
What's the reason?
The same article was posted on the Apache Hive issue.
https://issues.apache.org/jira/browse/HIVE-26593
1 REPLY 1
Super Collaborator
Created ‎10-07-2022 05:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @sseoju ,
You may get the required information in Impala as shown below:
[node1:21000] default> CREATE EXTERNAL TABLE IF NOT EXISTS test_table
> (
> `id` string comment 'id',
> `name` string comment 'name',
> `area` struct<`country`: string comment "test country", `address`:string comment 'test address'> comment 'test struct'
> );
Query: CREATE EXTERNAL TABLE IF NOT EXISTS test_table
(
`id` string comment 'id',
`name` string comment 'name',
`area` struct<`country`: string comment "test country", `address`:string comment 'test address'> comment 'test struct'
)
+-------------------------+
| summary |
+-------------------------+
| Table has been created. |
+-------------------------+
Fetched 1 row(s) in 0.26s
[node1:21000] default> desc test_table;
Query: describe test_table
+------+------------------------------------------+-------------+
| name | type | comment |
+------+------------------------------------------+-------------+
| id | string | id |
| name | string | name |
| area | struct< | test struct |
| | country:string comment 'test country', | |
| | address:string comment 'test address' | |
| | > | |
+------+------------------------------------------+-------------+
Fetched 3 row(s) in 0.28s
This is also mentioned here https://impala.apache.org/docs/build/html/topics/impala_describe.html
Let me know if this helps.
Cheers!
