[
https://issues.apache.org/jira/browse/HUDI-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17392955#comment-17392955
]
ASF GitHub Bot commented on HUDI-1842:
--------------------------------------
pengzhiwei2018 commented on pull request #3393:
URL: https://github.com/apache/hudi/pull/3393#issuecomment-892526491
> > Hey peng. I did a round of testing on this patch. Here are my findings.
> > Insert into is till prefixing col name to meta fields. (3rd col and 4th
col)
> > ```
> > select * from hudi_ny where tpep_pickup_datetime like '%00:04:03%';
> > 20210802105420 20210802105420_2_23 2019-01-01 00:04:03
2019-01-01
c5e6a617-dfc5-4051-8c1a-8daead3847af-0_2-37-62_20210802105420.parquet 2
2019-01-01 00:04:03 2019-01-01 00:11:48 1 3.01 1 N
137 262 1 10.0 0.5 0.5 2.26 0.0 0.3 13.56
NULL 2019-01-01
> > 20210803162030 20210803162030_0_1 tpep_pickup_datetime:2021-01-01
00:04:03 date_col=2021-01-01
c5c72f9e-9a63-48ca-a981-4302890f5210-0_0-27-1635_20210803162030.parquet 2
2021-01-01 00:04:03 2021-01-01 00:11:48 1 3.01 1 N
137 262 10.0 0.5 0.5 2.26 0.0 0.3 13.56 NULL
2021-01-01
> > Time taken: 0.524 seconds, Fetched 2 row(s)
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 1st row was part of the table before onboarding to spark-sql.
> > 2nd row was inserted using insert into.
> > Hi @nsivabalan , I know the difference now. The spark sql use the
`SqlKeyGenerator` which is a sub-class of `ComplexKeyGenerator` to generated
record key which will add the column name to the record key. While the
`SimpleKeyGenerator` will not do that. So we should keep the behavior the same
for `ComplexKeyGenerator` and `SimpleKeyGenerator`.
>
> sorry, I don't get you. I understand SqlKeyGenerator extends from
ComplexKeyGen. but why do we need to keep the same for SimpleKeyGen? We should
not add any field prefix for SimpleKeyGen. If not, no updates will work for an
existing table.
Hi @nsivabalan , Have solved the record key not matched issue. Please take a
test again~
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> [SQL] Spark Sql Support For The Exists Hoodie Table
> ---------------------------------------------------
>
> Key: HUDI-1842
> URL: https://issues.apache.org/jira/browse/HUDI-1842
> Project: Apache Hudi
> Issue Type: Sub-task
> Reporter: pengzhiwei
> Assignee: pengzhiwei
> Priority: Blocker
> Labels: pull-request-available, release-blocker
> Fix For: 0.9.0
>
>
> In order to support spark sql for hoodie, we persist some table properties to
> the hoodie.properties. e.g. primaryKey, preCombineField, partition columns.
> For the exists hoodie tables, these properties are missing. We need do some
> code in UpgradeDowngrade to support spark sql for the exists tables.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)