npawar opened a new pull request #5748: URL: https://github.com/apache/incubator-pinot/pull/5748
## Description GROOVY transform function for query time. Syntax: ``` groovy('groovy expression', argument0, argument1, argument2..., 'return value metadata') ``` - 1st argument is the groovy expression. Use arg0, arg1 etc for referring to arguments. - last argument is a json string representing all return value metadata. Example: `{"returnType":"INT","isSingleValue":true}` - all arguments in between (2nt to n-1st) are arguments to the function (identifiers/functions) Examples: - `groovy('arg0 + arg1', colA, colB, '{"returnType":"INT","isSingleValue":true}')` - `groovy('arg0.toList().max()', mvColumn, '{"returnType":"INT","isSingleValue":true}')` - `groovy('arg0.findIndexValues{ it > 5 }', mvColumn, '{"returnType":"LONG","isSingleValue":false}')` - `groovy('arg0 * arg1', arraylength(mvColumn), colB, '{"returnType":"DOUBLE","isSingleValue":true}')` Example in query: `SELECT GROOVY('arg0+" "+arg1', firstName, lastName, '{"returnType":"STRING","isSingleValue":true}') FROM myTable` Refer to `GroovyTransformFunctionTest` for more examples. **Detailed documentation coming soon.** ## Release Notes GROOVY - New transform UDF which executes Groovy expressions in query. ## Documentation TBD ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org