subhramit commented on PR #58225:
URL: https://github.com/apache/spark/pull/58225#issuecomment-5548908775

   > One more reachable site of the same bug class, in 
`sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproxCountDistinctForIntervals.scala`
 (~line 88): `checkInputDataTypes` raises 
`DATATYPE_MISMATCH.NON_FOLDABLE_INPUT` when the endpoints expression is not 
foldable, but passes only `inputName`/`inputType` while the template also needs 
`<inputExpr>`, and the `dataTypeMismatch` wrapper only adds `sqlExpr`. The 
result is `INTERNAL_ERROR` at analysis time instead of the intended error. 
Pre-existing code, not introduced here, but the same bug class this PR fixes.
   > 
   > Adding `"inputExpr" -> toSQLExpr(endpointsExpression)` covers it; the 
class already mixes in `QueryErrorsBase` and `binByNonFoldableInputError` 
already builds all four keys.
   
   Covered in latest commit


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to