YannByron commented on pull request #3700:
URL: https://github.com/apache/hudi/pull/3700#issuecomment-952084030


   > > @dongkelun Sorry, I personally think the previous solution to lowercase 
fields may not be the best and most correct one. We should dig into the root 
cause.
   > 
   > In column name matching, I can't think of any better method except to 
lowercase fields. Can you provide some ideas?
   
   For 
   
   > > > > @dongkelun I reproduce this using the table in UT in my local env, 
`ClassCastException` is raised. The detail trace stack: `Caused by: 
java.lang.ClassCastException: org.apache.spark.unsafe.types.UTF8String cannot 
be cast to java.lang.Integer at 
org.apache.hudi.sql.payload.ExpressionPayloadEvaluator_228eb15b_f549_4127_a201_a71c459c1f61.eval(Unknown
 Source) at 
org.apache.spark.sql.hudi.command.payload.ExpressionPayload.evaluate(ExpressionPayload.scala:258)
 `
   > > > > is it same with yours?
   > > > 
   > > > 
   > > > Sorry, I don't know what UT is or how to use it. Is UTC time set or 
something else?
   > > 
   > > 
   > > I mean UT is unit test. sql is run as followed :
   > > create table h0 ( id int, name string, price double, ts long, dt string) 
using hudi options (primaryKey ='id', preCombineField = 'ts');
   > > merge into h0 as t0 using (select 1 as ID, 'a1' as NAME, 1111 as TS, 
'2021-05-05' as DT, 111 as PRICE) as s0 on t0.id = s0.id when matched then 
update set * when not matched then insert *;
   > 
   > @YannByron hello,I encountered a similar problem when I added test cases 
for condition and action to ignore case matching
   > 
   > ```scala
   > Caused by: java.lang.RuntimeException: Error in execute expression: 
org.apache.spark.unsafe.types.UTF8String cannot be cast to java.lang.Double.
   > Expressions is: [boundreference() AS `ID`  boundreference() AS `NAME`  
(CAST(boundreference() AS DOUBLE) + boundreference()) AS `PRICE`  
CAST(boundreference() AS `TS` AS BIGINT)  boundreference() AS `DT`]
   > ```
   
   Is this solved?


-- 
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]


Reply via email to