mxnzx opened a new pull request, #8338:
URL: https://github.com/apache/gravitino/pull/8338

   
   ### What changes were proposed in this pull request?
   
   * Add support for `VarcharType` and `CharType` partition values in 
`SparkPartitionUtils#getSparkPartitionValue`.
   * Update `TestSparkPartitionUtils` to include `varchar(5)` and `char(2)` 
columns in schema/internalRow/literals/hivePartitionValues, so existing looped 
tests also cover these types.
   
   ### Why are the changes needed?
   
   Currently `SparkPartitionUtils` handles `StringType` but not its variants 
`VarcharType` and `CharType`.
   This PR adds conversion support for these types, ensuring consistent 
handling of all string variants.
   
   Fixes #8287.
   
   ### Does this PR introduce *any* user-facing change?
   
   No.
   This change only affects internal partition value conversion utilities and 
corresponding unit tests.
   
   ### How was this patch tested?
   
   * Extended the existing unit test `TestSparkPartitionUtils` by adding 
`varchar(5)` and `char(2)` columns to:
   
     * `schema`
     * `internalRow`
     * `literals`
     * `hivePartitionValues`
   * Verified that existing test methods (`testToGravitinoLiteral`, 
`testGetPartitionValueAsString`, and `testGetSparkPartitionValue`) now also 
validate `VarcharType` and `CharType`.
   
   All tests passed locally.
   


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