PedroMDuarte commented on PR #506:
URL: https://github.com/apache/datafusion-comet/pull/506#issuecomment-2226941038
> I would rather do this in QueryPlanSerde, E.g.
>
> ```
> case Log2(child) =>
> val childExpr = exprToProtoInternal(nullIfNegative(child),
inputs)
>
> def nullIfNegative(expression: Expression): {
> val zero = Literal.default(expression.dataType)
> If(LessThanOrEqual(expression, zero), Literal.create(null,
expression.dataType), expression)
> }
> ```
>
> See `nullIfWhenPrimitive` for a similar case.
thanks for this suggestion!
--
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]