ShauryaChauhan1411 opened a new pull request, #17221:
URL: https://github.com/apache/iotdb/pull/17221

   ## Description
   This PR fixes a ClassCastException occurring in the UDF transformation layer 
when processing large datasets with the M4 aggregation function. The issue was 
caused by a LongColumn being incorrectly treated as a TimeColumn within 
ElasticSerializableTVList.
   
   ## Design Decisions
   Helper Method: Added a private helper method ensureTimeColumn(Column column) 
in ElasticSerializableTVList to verify if the input column is an instance of 
TimeColumn.
   
   Safe Conversion: If the input is not a TimeColumn (e.g., a LongColumn), the 
helper extracts the values into a long[] array and constructs a new TimeColumn 
object, ensuring type safety.
   
   Comprehensive Coverage: Applied this check to all code paths in 
putColumn(...) where insertedTimeColumn is assigned, including cases where data 
is split via getRegionCopy.
   
   ## Verification
   Build: Successfully completed mvn clean compile and mvn spotless:apply. 
[cite: 2026-02-26]
   
   Tests: All relevant integration tests passed (47/47). [cite: 2026-02-26]
   
   Manual Verification: Verified that the reproduction query provided in Issue 
#16539 no longer triggers a ClassCastException.


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