voonhous opened a new pull request, #9586:
URL: https://github.com/apache/hudi/pull/9586

   ### Change Logs
   
   When Flink < 1.17 is used, `ITTestSchemaEvolution` will fail. This is so as 
implicit inference of Map value's schema are used. The schema used will be the 
row's last schema. This may cause unintended truncation (if last row is of 
length that is shorter than the longest string's key value) or unintended 
whitespace padding (if last row is of the longest map.key string length)
   
   **An example is shown below of truncation:**
   
   ```sql
   tEnv.executeSql("
   select  cast(f_map as map<string, int>)
   from (values  
        ( map['Indica', 111]) ),
        ( map['Danny', 111] ),
        ( map['Han', 111] ),
        ( map['Julian', 111] ),
        ( map['Fabian', 111] ),
        ( map['Sophia', 111] ),
        ( map['Emma', 111] ),
        ( map['Bob', 111] ),
        ( map['a', 111] )
   ) 
   as A(f_map)").print()
   ```
   
   
![image](https://github.com/apache/hudi/assets/6312314/03abd9b1-2b12-461d-bb8e-218e8208c311)
   
   **An example is shown below of whitespace padding:**
   
   ```sql
   tEnv.executeSql("
   select  cast(f_map as map<string, int>)
   from (values  
        ( map['Indica', 111]) ),
        ( map['Danny', 111] ),
        ( map['Han', 111] ),
        ( map['Julian', 111] ),
        ( map['Fabian', 111] ),
        ( map['Sophia', 111] ),
        ( map['Emma', 111] ),
        ( map['Bob', 111] ),
        ( map['Stephen', 111] )
   ) 
   as A(f_map)").print()
   ```
   
![image](https://github.com/apache/hudi/assets/6312314/a0f6e270-050c-496a-a991-8a1b2d846cf0)
   
   
   Detailed schema breakdown:
   
![image](https://github.com/apache/hudi/assets/6312314/f58fd5b1-c817-4ad4-9867-53074a146754)
   
   ### Impact
   
   Test in other versions should pass
   
   ### Risk level (write none, low medium or high below)
   
   None
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, 
config, or user-facing change_
   
   - _The config description must be updated if new configs are added or the 
default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. 
Please create a Jira ticket, attach the
     ticket number here and follow the 
[instruction](https://hudi.apache.org/contribute/developer-setup#website) to 
make
     changes to the website._
   
   ### Contributor's checklist
   
   - [X] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


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