Select 'aaa' || 'bbbb' bug

Dremio query bug
select ‘1111’ || nullif(‘a’,‘a’) as test1
result is null , Correct results is ‘1111’
the code com/dremio/exec/expr/fn/impl/

@FunctionTemplate(name = “concatOperator”, scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL)
public static class ConcatOperator implements SimpleFunction {
Param VarCharHolder left; ---------changeto------------> NullableVarCharHolder
Param VarCharHolder right; ----------changeto-----------> NullableVarCharHolder
Output VarCharHolder out;
Inject ArrowBuf buffer;


I see Postgres also returns null, which database returned 1111?

select '1111'||nullif(1,1)                                    ;
(1 row)

That should be why my version is old。 :grinning:


@kkkk Sorry, do not follow. Which application’s version is old?

I mean, the Postgres version is older

Hi @kkkk In which version of PG, do you see the right results?