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 2020/04/14 07:09:05 UTC

[GitHub] [incubator-doris] blackfox1983 commented on issue #3287: sql result is wrong when column type in doris is inconsistent with es

blackfox1983 commented on issue #3287: sql result is wrong when column type in doris is inconsistent with es
URL: https://github.com/apache/incubator-doris/issues/3287#issuecomment-613265363
 
 
   关于后续doris on es的字段类型的初步考虑:
   1、原则上字段类型需要一致。这样对于维护以及做自动化的同步工具都非常关键(如alter table时的新增字段,类型一致则可以自动化去做)
   
   
   对于一些场景。如为了使用ES的索引性能,对于整数在ES中存储为keyword(string),使用原则1,则doris中的表类型也需为VARCHAR。这样在使用sum等函数的时候在sql中使用cast转换即可。而这种场景下,大多数的请求是在做term查询,因此在sql中使用cast的频率相对也不会太高。如果在ES中类型为long,那么doris中类型一般是bigint,此处不需要在sql中做cast,这个时候的场景,多是用ES在范围扫描,点查询相对不多。因此不论何种方式,均会牺牲掉一些特性,这里考虑到场景下的多数情况,采用了上述原则1的方式。
   
   refer @wuyunfeng 欢迎补充

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


With regards,
Apache Git Services

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