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

SHOW CREATE TABLE does not correctly display the partition projection column properties #16873

Open
findinpath opened this issue Apr 4, 2023 · 3 comments
Labels
bug Something isn't working hive Hive connector

Comments

@findinpath
Copy link
Contributor

In hive.properties add hive.partition-projection-enabled=true

trino:default> create table hive.default.test1( 
            ->    name varchar(10), 
            ->    comment varchar(10), 
            ->    nationkey bigint, 
            ->    regionkey bigint, 
            ->    short_name varchar(100) 
            ->      with (partition_projection_type = 'enum', partition_projection_values = array['PL1', 'CZ1'])
            -> )
            -> with (
            ->     partitioned_by = array['short_name'], 
            ->     partition_projection_enabled = true);
CREATE TABLE
trino:default> show create table test1;
              Create Table               
-----------------------------------------
 CREATE TABLE hive.default.test1 (       
    name varchar(10),                    
    comment varchar(10),                 
    nationkey bigint,                    
    regionkey bigint,                    
    short_name varchar(100)              
 )                                       
 WITH (                                  
    format = 'ORC',                      
    partition_projection_enabled = true, 
    partitioned_by = ARRAY['short_name'] 
 )                                       
(1 row)

In the example above it would be expected that the column short_name has displayed also

WITH (partition_projection_type = 'enum', partition_projection_values = ARRAY['PL1', 'CZ1'])
@findinpath findinpath added bug Something isn't working hive Hive connector labels Apr 4, 2023
@aczajkowski
Copy link
Member

Nice finding. We could extend test like this here to cover it.

public void testEnumPartitionProjectionOnVarcharColumnWithWhitespace()

@tsafacjo
Copy link

tsafacjo commented Nov 1, 2023

can I take this issue ?

@findinpath
Copy link
Contributor Author

findinpath commented Nov 6, 2023

@tsafacjo go for it.
Feel free to create a PR and add to its description Fixes #16873

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hive Hive connector
Development

No branches or pull requests

3 participants