BenjMaq edited a comment on issue #4154:
URL: https://github.com/apache/hudi/issues/4154#issuecomment-1021303523


   Hi again, 
   
   Still trying to understand the issue :)
   
   
   Here's the create table statement I run to create the table using 
`spark-sql`: 
   ```
   CREATE TABLE IF NOT EXISTS public.test_partitioned (
       id bigint,
       name string,
       start_date string,
       dt string
   ) USING hudi
   LOCATION 's3a://<s3_bucket>/hudi_data_lake/test_partitioned'
   OPTIONS (
     type = 'cow',
     primaryKey = 'id',
     preCombineField = 'start_date'
   )
   PARTITIONED BY (dt);
   ```
   
   and here's the DDL when I run `show create table public.test_partitioned` in 
Hive cli:
   ```
   CREATE EXTERNAL TABLE `public.test_partitioned`(
     `_hoodie_commit_time` string,
     `_hoodie_commit_seqno` string,
     `_hoodie_record_key` string,
     `_hoodie_partition_path` string,
     `_hoodie_file_name` string,
     `id` bigint,
     `name` string,
     `start_date` string)
   PARTITIONED BY (
     `dt` string)
   ROW FORMAT SERDE
     'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
   WITH SERDEPROPERTIES (
     'path'='s3a://<s3_bucket>/hudi_data_lake/test_partitioned',
     'preCombineField'='start_date',
     'primaryKey'='id',
     'type'='cow')
   STORED AS INPUTFORMAT
     'org.apache.hudi.hadoop.HoodieParquetInputFormat'
   OUTPUTFORMAT
     'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
   LOCATION
     's3a://<s3_bucket>/hudi_data_lake/test_partitioned'
   TBLPROPERTIES (
     'last_commit_time_sync'='20220125071309',
     'spark.sql.create.version'='2.4.4-20210211',
     'spark.sql.sources.provider'='hudi',
     'spark.sql.sources.schema.numPartCols'='1',
     'spark.sql.sources.schema.numParts'='1',
     
'spark.sql.sources.schema.part.0'='{"type":"struct","fields":[{"name":"_hoodie_commit_time","type":"string","nullable":true,"metadata":{}},{"name":"_hoodie_commit_seqno","type":"string","nullable":true,"metadata":{}},{"name":"_hoodie_record_key","type":"string","nullable":true,"metadata":{}},{"name":"_hoodie_partition_path","type":"string","nullable":true,"metadata":{}},{"name":"_hoodie_file_name","type":"string","nullable":true,"metadata":{}},{"name":"id","type":"long","nullable":true,"metadata":{}},{"name":"name","type":"string","nullable":true,"metadata":{}},{"name":"start_date","type":"string","nullable":true,"metadata":{}},{"name":"dt","type":"string","nullable":true,"metadata":{}}]}',
     'spark.sql.sources.schema.partCol.0'='dt',
     'transient_lastDdlTime'='1643122431')
   ```
   
   
   Are you maybe seeing something that looks off? I see for example 
   ```
   STORED AS INPUTFORMAT
     'org.apache.hudi.hadoop.HoodieParquetInputFormat'
   ```
   which is neither `HiveInputFormat` nor `HoodieCombineHiveInputFormat` 
mentioned by @nsivabalan. Is that normal? As mentioned above, I've followed the 
steps in https://hudi.apache.org/docs/query_engine_setup#PrestoDB to be able to 
read from Presto and Hive.
   
   Thank you


-- 
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-unsubscr...@hudi.apache.org

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


Reply via email to