You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/08/04 09:56:37 UTC

[GitHub] [hudi] pengzhiwei2018 commented on pull request #3393: [HUDI-1842] Spark Sql Support For The Exists Hoodie Table

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: commits-unsubscribe@hudi.apache.org

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