云服务器内容精选

  • Schema演进支持范围 Schema演进支持范围: 支持列(包括嵌套列)相关的增、删、改、位置调整等操作。 不支持对分区列做演进。 不支持对Array类型的嵌套列进行增、删、列操作。 表1 引擎支持矩阵 引擎 DDL操作Schema 变更后的Hudi表写操作支持 变更后的Hudi表读操作支持 变更后Hudi表compaction支持 SparkSQL Y Y Y Y Flink N Y Y Y HetuEngine N N Y N Hive N N Y N 父主题: Hudi Schema演进
  • DDL与DML并发 表2 支持的DDL与DML并发操作 DDL操作 insert into update delete set/reset add Y Y Y Y rename N N Y N change type N N Y N change comment Y Y Y Y drop N N Y N 执行不支持的DDL与DML并发操作时会发生异常“cannot evolution schema implicitly, actions such as rename, delete, and type change were found”。
  • DDL并发 表1 支持的DDL并发操作 DDL操作 add rename change type change comment drop add Y Y Y Y Y rename Y Y Y Y Y change type Y Y Y Y Y change comment Y Y Y Y Y drop Y Y Y Y N 对同一列并发执行DDL操作需要注意以下两点: 不能对同一列并发执行drop,否则只能成功执行第一个drop随后发生异常“java.lang.UnsupportedOperationException: cannot evolution schema implicitly, the column for which the update operation is performed does not exist.”。 drop与rename、change type和change comment并发执行时,drop必须是最后执行,否则只能执行drop以及drop之前的命令,执行drop之后的命令会发生异常“java.lang.UnsupportedOperationException: cannot evolution schema implicitly, the column for which the update operation is performed does not exist.”。
  • 示例 alter table h0 add columns(ext0 string); alter table h0 add columns(new_col int not null comment 'add new column' after col1); alter table complex_table add columns(col_struct.col_name string comment 'add new column to a struct col' after col_from_col_struct);