Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iceberg tables do not show partition key in DESCRIBE #22638

Closed
yzhang1991 opened this issue Apr 30, 2024 · 0 comments · Fixed by #22675
Closed

Iceberg tables do not show partition key in DESCRIBE #22638

yzhang1991 opened this issue Apr 30, 2024 · 0 comments · Fixed by #22675
Labels
bug iceberg Apache Iceberg related

Comments

@yzhang1991
Copy link

Your Environment

  • Presto version used: latest master
  • Storage (HDFS/S3/GCS..): S3
  • Data source and connector used: Iceberg
  • Deployment (Cloud or On-prem): On-prem

Expected Behavior

Partition key has the value partition key in the Extra column of the DESCRIBE output like hive:

presto:tpcds_sf10000_parquet_varchar_iceberg_part> use hive.tpcds_sf10000_parquet_varchar_part;
USE
presto:tpcds_sf10000_parquet_varchar_part> describe store_sales;
        Column         |     Type     |     Extra     | Comment
-----------------------+--------------+---------------+---------
 ss_sold_time_sk       | integer      |               |
....omitted....
 ss_net_profit         | decimal(7,2) |               |
 ss_sold_date_sk       | bigint       | partition key |
(23 rows)

Current Behavior

The partition key has an empty Extra value for partitioned Iceberg tables.

presto:tpcds_sf10000_parquet_varchar_iceberg_part> describe store_sales;;
        Column         |     Type     | Extra | Comment
-----------------------+--------------+-------+---------
 ss_sold_time_sk       | integer      |       |
 ss_item_sk            | integer      |       |
....omitted....
 ss_net_profit         | decimal(7,2) |       |
 ss_sold_date_sk       | bigint       |       |
(23 rows)

Query 20240430_054246_00031_fn54c, FINISHED, 3 nodes
Splits: 6 total, 6 done (100.00%)
[Latency: client-side: 379ms, server-side: 270ms] [23 rows, 2.59KB] [85 rows/s, 9.59KB/s]

presto:tpcds_sf10000_parquet_varchar_iceberg_part> show create table store_sales;
                                     Create Table
---------------------------------------------------------------------------------------
 CREATE TABLE iceberg.tpcds_sf10000_parquet_varchar_iceberg_part.store_sales (
    "ss_sold_time_sk" integer,
    "ss_item_sk" integer,
 ....omitted....
    "ss_net_profit" decimal(7,2),
    "ss_sold_date_sk" bigint
 )
 WITH (
    delete_mode = 'copy-on-write',
    format = 'PARQUET',
    format_version = '2',
    location = 's3a://presto-workload/tpcds-sf10000-parquet-iceberg-part/store_sales',
    partitioning = ARRAY['ss_sold_date_sk']
 )
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug iceberg Apache Iceberg related
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants