You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "hudi-bot (via GitHub)" <gi...@apache.org> on 2025/11/30 04:53:49 UTC

[I] Supports CTAS compatibility with string, char, and varchar. [hudi]

hudi-bot opened a new issue, #15140:
URL: https://github.com/apache/hudi/issues/15140

   1、create a table containing fields of type char and type varchar use hive.
   
   create table hivetb_char (id int, comb int, col0 char(5), col1 varchar(5)) row format delimited fields terminated by ',' stored as orc;
   
   insert into hivetb_char select 1,100,'aaaaa','bbbbb';
   
   2、run CTAS to create hudi table by sparksql
   
   create table hudi_test_char using hudi options(primaryKey='id', preCombineField='comb') as select * from default.hivetb_char;
   
   !https://clouddevops.huawei.com/vision-file-storage/api/file/download/upload-v2/2021/8/14/qwx352829/e4f814488cb145f0b8dcd9595b0d9e90/image.png!
   
   ## JIRA info
   
   - Link: https://issues.apache.org/jira/browse/HUDI-3944
   - Type: Improvement


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Supports CTAS compatibility with string, char, and varchar. [hudi]

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on issue #15140:
URL: https://github.com/apache/hudi/issues/15140#issuecomment-4795324394

   This appears to have been resolved by [HUDI-6219](https://issues.apache.org/jira/browse/HUDI-6219) (PR #8725, commit `ea547e568`) back in May 2023, which extended the Spark→Avro schema converter to map `CharType` and `VarcharType` to Avro `string`. On current master:
   
   - `HoodieSparkSchemaConverters.scala:130` — `case StringType | _: CharType | _: VarcharType => HoodieSchema.create(HoodieSchemaType.STRING)`
   - Regression coverage in `TestCreateTable.scala` (`Test hoodie table schema consistency for non-Avro data types`, using `varchar(10)`) and in `TestHoodieSchemaConversionUtils.scala` (`test CharType and VarcharType conversion to STRING`).
   
   If you can still reproduce this on a recent Hudi release (1.x / current master), please share the stack trace and Hudi/Spark versions; otherwise this issue can likely be closed. Closing HUDI-3944 / PR #5390 as superseded.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Supports CTAS compatibility with string, char, and varchar. [hudi]

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan closed issue #15140: Supports CTAS compatibility with string, char, and varchar.
URL: https://github.com/apache/hudi/issues/15140


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Supports CTAS compatibility with string, char, and varchar. [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on issue #15140:
URL: https://github.com/apache/hudi/issues/15140#issuecomment-3630215317

   ### Linked PR(s)
   
   - https://github.com/apache/hudi/pull/5390


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org