You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/03/10 06:34:43 UTC

[GitHub] [incubator-doris] HappenLee edited a comment on issue #5447: [Bug][union all same field with different types make EXCEPTION] Unexpected exception: Failed analysis after expr substitution.

HappenLee edited a comment on issue #5447:
URL: https://github.com/apache/incubator-doris/issues/5447#issuecomment-794960744


   Hi, @francisoliverlee It's look like the problem of type cast. Before we fix the problem, you can use the sql like
   ```
   select
       distinct teacher_region
   from
       (
           select
               cast (teacher_region as varcher) as teacher_region
           from
               test.dp_class_student_test
           union all
           select
               '全国' as teacher_region
           from
               test.dp_class_student_test
       ) as aaa
   where teacher_region in ('1', '全国')
   ```
   to avoid the problem appear.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org