FearfulTomcat27 opened a new pull request, #14755: URL: https://github.com/apache/iotdb/pull/14755
This pull request introduces new functionality to support the `GREATEST` and `LEAST` scalar functions in the IoTDB query engine. The changes include adding new transformer classes, updating metadata validation, and creating integration tests to verify the new functions. New functionality: * [`iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/column/multi/GreatestColumnTransformer.java`](diffhunk://#diff-e4ca476df7d968ed1a0d09feea52885eb4d2e922a7e60ea31ee019dec641d15aR1-R61): Added a new transformer class for the `GREATEST` function to determine the maximum value among multiple columns. * [`iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/column/multi/LeastColumnTransformer.java`](diffhunk://#diff-3b8c7e2e87c0f97592d680ce24e216f6784281eb3da9b54396d9b2ddd5dbf709R1-R61): Added a new transformer class for the `LEAST` function to determine the minimum value among multiple columns. Metadata validation: * [`iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadataImpl.java`](diffhunk://#diff-5420ab45f1bfb25708b0cd843b2770256e0671bc180acb7abf7f8a89888a3aa0R545-R553): Updated metadata validation to ensure that the `GREATEST` and `LEAST` functions have at least two arguments and all arguments are of the same type. [[1]](diffhunk://#diff-5420ab45f1bfb25708b0cd843b2770256e0671bc180acb7abf7f8a89888a3aa0R545-R553) [[2]](diffhunk://#diff-5420ab45f1bfb25708b0cd843b2770256e0671bc180acb7abf7f8a89888a3aa0R897-R918) Integration tests: * [`integration-test/src/test/java/org/apache/iotdb/relational/it/query/old/query/IoTDBGreatestLeastTableIT.java`](diffhunk://#diff-3ebb39862466df9835f4759c18ce131c3bf343a81bc3f07102b35dc25e7d1472R1-R233): Created a new integration test class to verify the behavior of the `GREATEST` and `LEAST` functions across different data types and scenarios. -- 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]
