You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Alberic Liu (Jira)" <ji...@apache.org> on 2023/03/22 05:58:00 UTC
[jira] [Created] (HUDI-5971) About full schema evolution, alter column type do not support nest column but can alter inside struct type
Alberic Liu created HUDI-5971:
---------------------------------
Summary: About full schema evolution, alter column type do not support nest column but can alter inside struct type
Key: HUDI-5971
URL: https://issues.apache.org/jira/browse/HUDI-5971
Project: Apache Hudi
Issue Type: Bug
Reporter: Alberic Liu
reproduce steps:
* create the test table:
CREATE TABLE default.schema_evolution_test (
id bigint,
test_array array<int>,
test_array_struct ARRAY<STRUCT<name:STRING, age:INT>>)
USING hudi
TBLPROPERTIES (
type = 'cow',
primaryKey = 'id')
LOCATION 's3://trino-ci-test/schema_evolution_test'
* enable the full schema evolution
SET hoodie.schema.on.read.enable=true
* alter the nested table column type, there is exception
{color:#de350b}SQL A:{color} alter table default.schema_evolution_test alter column test_array_struct type ARRAY<STRUCT<name:STRING, age:FLOAT>>;
Exception: Failed in [alter table default.schema_evolution_test alter column test_array_struct type ARRAY<STRUCT<name:STRING, age:FLOAT>>]
* alter the inner struct type, it can execute successfully
{color:#de350b}SQL B:{color} alter table default.schema_evolution_test alter column test_array_struct.element.age type FLOAT;
* Describe the table schema;
desc default.schema_evolution_test;
id bigint
test_array array<int>
test_array_struct array<struct<name:string,age:float>>
* Question:
## is this a bug of alter table column type for Hudi?
## Both SQL A and SQL B is used to change the type from array<struct<name:string,age:int>> to array<struct<name:string,age:float>>, why SQL A do not supported?
## SQL B is worked as expected or not? and SQL A will be supported in next release?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)