ScalarTransformFunctionWrapper throws exception for Object return type
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 195
Description
`ScalarTransformFunctionWrapper` throws an exception for any transformation function with `Object` return type. for example, `casewhen` or `cast`
Here is one such stack trace:
```bash
java.lang.IllegalStateException: Cannot convert ColumnDataType: OBJECT to DataType
at org.apache.pinot.common.utils.DataSchema$ColumnDataType.toDataType(DataSchema.java:311)
at org.apache.pinot.core.operator.transform.function.ScalarTransformFunctionWrapper.(ScalarTransformFunctionWrapper.java:69)
at org.apache.pinot.core.operator.transform.function.TransformFunctionFactory.get(TransformFunctionFactory.java:316)
at org.apache.pinot.core.operator.transform.function.TransformFunctionFactory.get(TransformFunctionFactory.java:347)
```
this was introduced with the [PR](https://github.com/apache/pinot/pull/11453), [specific code change](https://github.com/apache/pinot/commit/6c69be463fea9ba9c0fe0103215f47581d41f8d4#diff-689152b23aca017e750b7828a4f12e3dad5e5deb523e423bb53a3b933aca77c2R68)
Contributor guide
Research direction
Start with ScalarTransformFunctionWrapper.java:69 and trace the Object return-type handling through DataSchema.java:311 and TransformFunctionFactory.java. Reproduce the failure with a transformation such as casewhen or cast, then verify that transformations returning Object no longer throw the reported IllegalStateException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100