doris icon indicating copy to clipboard operation
doris copied to clipboard

[Bug] Only support subquery in binary predicate in case statement

Open wmtbnbo opened this issue 1 year ago • 1 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

2.0.4

What's Wrong?

When I encounter the following syntax in a query, using the query as a view or executing insert into select will result in an error as described in the title. I don't know if this is a bug, but executing this query directly will not result in an error.

       case
         when exists (select 1
                 from user.retustat lr
                where lr.cno = a.cno
                  and lr.preretutype = '2') then
          '1'
         else
          '0'
       end replacetermflag,

What You Expected?

Can create views or execute insert into select normally

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

wmtbnbo avatar Feb 23 '24 02:02 wmtbnbo

Let me see.

liugddx avatar Feb 23 '24 02:02 liugddx

try add this after select

/*+SET_VAR(disable_nereids_rules='TRANSPOSE_LOGICAL_SEMI_JOIN_AGG_PROJECT, TRANSPOSE_LOGICAL_SEMI_JOIN_AGG')*/

@wmtbnbo

iwanttobepowerful avatar Mar 16 '24 14:03 iwanttobepowerful