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

[Bug report] Trino: create table with 'external' property pop error, but doc shows graivitino support this property #5399

Open
danhuawang opened this issue Oct 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@danhuawang
Copy link
Contributor

Version

main branch

Describe what's wrong

image image

Error message and/or stacktrace

trino:default> CREATE TABLE ex_ht9 (                                               
            ->     c_tinyint tinyint,                                                            
            ->     c_smallint smallint,                                                          
            ->     c_int integer,                                                                
            ->     c_bigint bigint,                                                              
            ->     c_float real,                                                                 
            ->     c_double double,                                                              
            ->     c_decimal decimal(10, 0),                                                     
            ->     c_decimal_w_params decimal(10, 5),                                            
            ->     c_timestamp timestamp(3),                                                     
            ->     c_date date,                                                                  
            ->     c_string varchar,                                                             
            ->     c_varchar varchar(10),                                                        
            ->     c_char char(10),                                                              
            ->     c_boolean boolean,                                                            
            ->     c_binary varbinary               
            ->  ) WITH (location = 'file:/tmp/data',external = 'true') ;
Query 20241014_082738_00144_99tyk failed: Failed to operate table(s) [ex_ht9] operation [CREATE] under schema [default], reason [Properties are reserved and cannot be set: [EXTERNAL]]
java.lang.IllegalArgumentException: Properties are reserved and cannot be set: [EXTERNAL]
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:218)
        at org.apache.gravitino.catalog.PropertiesMetadataHelpers.validatePropertyForCreate(PropertiesMetadataHelpers.java:55)
        at org.apache.gravitino.catalog.TableOperationDispatcher.lambda$internalCreateTable$19(TableOperationDispatcher.java:436)
        at org.apache.gravitino.catalog.CatalogManager$CatalogWrapper.lambda$doWithPropertiesMeta$6(CatalogManager.java:176)
        at org.apache.gravitino.utils.IsolatedClassLoader.withClassLoader(IsolatedClassLoader.java:86)
        at org.apache.gravitino.catalog.CatalogManager$CatalogWrapper.doWithPropertiesMeta(CatalogManager.java:176)
        at org.apache.gravitino.catalog.TableOperationDispatcher.lambda$internalCreateTable$20(TableOperationDispatcher.java:434)
        at org.apache.gravitino.catalog.OperationDispatcher.doWithCatalog(OperationDispatcher.java:97)
        at org.apache.gravitino.catalog.TableOperationDispatcher.internalCreateTable(TableOperationDispatcher.java:431)
        at org.apache.gravitino.catalog.TableOperationDispatcher.lambda$createTable$4(TableOperationDispatcher.java:156)
        at org.apache.gravitino.lock.TreeLockUtils.doWithTreeLock(TreeLockUtils.java:49)
        at org.apache.gravitino.catalog.TableOperationDispatcher.createTable(TableOperationDispatcher.java:152)
        at org.apache.gravitino.hook.TableHookDispatcher.createTable(TableHookDispatcher.java:76)
        at org.apache.gravitino.catalog.TableNormalizeDispatcher.createTable(TableNormalizeDispatcher.java:78)
        at org.apache.gravitino.listener.TableEventDispatcher.createTable(TableEventDispatcher.java:114)
        at org.apache.gravitino.server.web.rest.TableOperations.lambda$createTable$2(TableOperations.java:124)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
        at java.base/javax.security.auth.Subject.doAs(Subject.java:439)
        at org.apache.gravitino.utils.PrincipalUtils.doAs(PrincipalUtils.java:39)
        at org.apache.gravitino.server.web.Utils.doAs(Utils.java:159)
        at org.apache.gravitino.server.web.rest.TableOperations.createTable(TableOperations.java:116)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)

How to reproduce

  1. Set up Trino and Hive
  2. Run create table on Trino:
CREATE TABLE ex_ht9 (                                               
    c_tinyint tinyint,                                                            
    c_smallint smallint,                                                          
    c_int integer,                                                                
    c_bigint bigint,                                                              
    c_float real,                                                                 
    c_double double,                                                              
    c_decimal decimal(10, 0),                                                     
    c_decimal_w_params decimal(10, 5),                                            
    c_timestamp timestamp(3),                                                     
    c_date date,                                                                  
    c_string varchar,                                                             
    c_varchar varchar(10),                                                        
    c_char char(10),                                                              
    c_boolean boolean,                                                            
    c_binary varbinary                                                            
 ) WITH (location = 'file:/tmp/data',external = 'true') ;

CREATE TABLE ex_ht10 (                                               
    c_tinyint tinyint,                                                            
    c_smallint smallint,                                                          
    c_int integer,                                                                
    c_bigint bigint,                                                              
    c_float real,                                                                 
    c_double double,                                                              
    c_decimal decimal(10, 0),                                                     
    c_decimal_w_params decimal(10, 5),                                            
    c_timestamp timestamp(3),                                                     
    c_date date,                                                                  
    c_string varchar,                                                             
    c_varchar varchar(10),                                                        
    c_char char(10),                                                              
    c_boolean boolean,                                                            
    c_binary varbinary                                                            
 ) WITH (location = 'file:/tmp/data',external = true) ;

Additional context

Gravitino doc says support this property:

image
@danhuawang danhuawang added the bug Something isn't working label Oct 31, 2024
@danhuawang
Copy link
Contributor Author

@diqiu50 Can you help check this issue?

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

No branches or pull requests

1 participant