doris icon indicating copy to clipboard operation
doris copied to clipboard

[Fix](planner)fix cast error when query a view with cast to string-like type.

Open sohardforaname opened this issue 2 years ago • 7 comments

Proposed changes

Issue Number: close #xxx

Problem summary

fix bug:

create table t ( id int, k1 int ) distributed by hash(id) buckets 4 properties(...)

create view v1 as select cast(k1 as varchar) k1 from t1 select k1 from v1

which will cause 'Failed analysis when expr subsitution' because inlineViewDef always change string-like type to char.

Checklist(Required)

  • [ ] Does it affect the original behavior
  • [ ] Has unit tests been added
  • [ ] Has document been added or modified
  • [ ] Does it need to update dependencies
  • [x] Is this PR support rollback (If NO, please explain WHY)

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

sohardforaname avatar Feb 25 '23 05:02 sohardforaname

PR approved by at least one committer and no changes requested.

github-actions[bot] avatar Feb 28 '23 02:02 github-actions[bot]

PR approved by anyone and no changes requested.

github-actions[bot] avatar Feb 28 '23 02:02 github-actions[bot]

run buildall

sohardforaname avatar Feb 28 '23 03:02 sohardforaname

run buildall

sohardforaname avatar Feb 28 '23 04:02 sohardforaname

run fe ut

sohardforaname avatar Feb 28 '23 04:02 sohardforaname

run buildall

sohardforaname avatar Feb 28 '23 10:02 sohardforaname

PR approved by at least one committer and no changes requested.

github-actions[bot] avatar Mar 01 '23 04:03 github-actions[bot]