StarRocks / starrocks

The world's fastest open query engine for sub-second analytics both on and off the data lakehouse. With the flexibility to support nearly any scenario, StarRocks provides best-in-class performance for multi-dimensional analytics, real-time analytics, and ad-hoc queries. A Linux Foundation project.
https://starrocks.io
Apache License 2.0
9k stars 1.81k forks source link

基于Hive外部表table_type返回值的差异 #28651

Closed suntao3212002 closed 1 year ago

suntao3212002 commented 1 year ago

QuickBI产品查询StarRocks数据源时,StarRocks如果是2.4版本及以下时,执行查询语句: select count(1) table_count from INFORMATION_SCHEMA.TABLES where table_schema = xx AND (table_type = 'BASE TABLE' OR table_type = 'VIEW'); 这个语句返回count值>=1,但是当SR升级至2.5版本或以上时,执行上面的语句反馈的count=0,经排查原因是因为starRocks在2.5版本或以上时,查询外部表返回的table_type值为:EXTERNAL_TABLE,和原先的BASE TABLE不一致

Astralidea commented 1 year ago

I have already submitted a PR to fix this problem, and I need to wait for the next release, or use my PR as a patch

keith-ch commented 1 year ago

@Astralidea 请问为什么这么改?我觉得外部表返回"external table"是合理的。

Astralidea commented 1 year ago

@keith-ch 你觉得合理,我也觉得合理,但是很多BI他是靠这个过滤的,如果我们不这么改,很多BI软件就看不到这个表了。

keith-ch commented 1 year ago

@Astralidea 目前我只看到quickBI存在不兼容问题,测试了Grafana和dataease并没有问题。 你们有发现其他BI有问题吗?

Astralidea commented 1 year ago

@keith-ch BI有很多的,你可以试一下metabase,trino,cognos,都可能有问题。

Astralidea commented 1 year ago

@keith-ch https://dev.mysql.com/doc/refman/8.0/en/information-schema-tables-table.html 另外mysql的标准里就不存在EXTERNAL TABLE,所以我们为了兼容BI,不会加入EXTERNAL TABLE标记的。