Yifeng-Wang opened a new pull request, #9107:
URL: https://github.com/apache/incubator-gluten/pull/9107

   ## What changes were proposed in this pull request?
   
   To add support for static function callls in Spark's 
CharVarcharCodegenUtils.java, we add expr matching pattern in Gluten 
ExpressionConverter.
   
   (Fixes: \#9106)
   
   ## How was this patch tested?
   
   Added test cases in Gluten's ScalarFunctionsValidateSuite.
   Built Gluten Velox with Spark 3.4 (Spark3.4.4 in pom.xml default) and test 
sqls.
   
   for test_varcharWriteSideCheck: 
   ```sql
   create table srcvarchar(id string) stored as parquet;
   create table tgt_vanilla(id varchar(3)) stored as parquet;
   create table tgt(id varchar(3)) stored as parquet;
   
   create table srcchar(id string) stored as parquet;
   create table tgt_vanilla(id char(3)) stored as parquet;
   create table tgt(id char(3)) stored as parquet;
   
   insert into srcvarchar values ('a');
   insert into srcvarchar values ('ab');
   insert into srcvarchar values ('t  '); -- trail space but should retain
   insert into srcvarchar values ('tra '); -- trail space but should trim
   insert into srcvarchar values ('中  '); -- trailing space but should retain
   insert into srcvarchar values ('中   '); -- trailing space but should trim to 
3
   insert into srcvarchar values ('中文中国'); -- will fail
   
   insert into tgt select id from srcvarchar
   ```
   
   for charWriteSideCheck: 
   ```sql
   insert into srcchar values ('a');
   insert into srcchar values ('ab');
   insert into srcchar values ('快');
   insert into srcchar values ('捷  ');
   insert into tgt_vanilla select id from srcchar where id='abcd';
   ```
   
   check plan to validate such operations offload to native and do not cause 
operator fallback:
   
![3668dcde999255823c0bfcfc9f55970](https://github.com/user-attachments/assets/9a5a37ce-8f6a-4dc3-bd63-a6f80845dcf0)


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to