zhangyue19921010 opened a new issue, #11314:
URL: https://github.com/apache/paimon/issues/11314

   ### Search before asking
   
   - [x] I searched in the issues and found nothing similar.
   
   ### Paimon version
   
   master at 71082ea86a57930f3fa00bb74f60d0a5dd676e35 (2.2-SNAPSHOT).
   
   ### Compute Engine
   
   Java internal data API; also reproduced through the Flink 1.20.1 runtime 
serializer.
   
   ### Minimal reproduce step
   
   DATE and TIME use integer values in Paimon's internal data representation. 
Copying a primitive-backed array fails:
   
   ```java
   InternalArray dates = new GenericArray(new int[] {-1, 0, 20000});
   new InternalArraySerializer(DataTypes.DATE()).copy(dates);
   ```
   
   This throws `RuntimeException: Unknown type: DATE`. The same happens for 
TIME and for nullable or non-nullable element types. 
`InternalRowUtils.copyArray` produces this representation for non-null 
DATE/TIME elements, so copying that output also fails. A row containing the 
array fails through `InternalRowSerializer.copy` and Flink's 
`InternalRowTypeSerializer.copy`, including its reuse overload.
   
   ### What doesn't meet your expectations?
   
   The copy operation should preserve valid DATE/TIME arrays and detach them 
from their source, just as it does for INT arrays. Serializing the same values 
already works.
   
   ### Anything else?
   
   The primitive-array copy switch handles INTEGER but omits DATE and TIME. 
Both can use its existing integer-array branch without changing serialization.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   


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