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/StringFunctions.java

@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;

@kkkk

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

select '1111'||nullif(1,1)                                    ;
 ?column? 
----------
 
(1 row)

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

2

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

I mean, the Postgres version is older 9.5.17.23

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