You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
Version
2.1.0
What's Wrong?
使用 VARIANT 字段存储 map 数据,查询时如果字段没有所查询的子列,会报异常。比如我下面这个表的数据
其中最后一列Tags字段是 VARIANT 类型,tags中的键值对是由业务无脑写入,无法提前预设,可能为空,可能不一致。
使用 SELECT * from LogChunk_1 where Tags['tag_key1'] is not null and CAST(tags['tag_key1'] as text) MATCH_ANY 'tag_val1' order by Time DESC limit 10 查询便会报如下 `SQL 错误
Search before asking
Version
2.1.0
What's Wrong?
使用 VARIANT 字段存储 map 数据,查询时如果字段没有所查询的子列,会报异常。比如我下面这个表的数据
![微信截图_20240313225502](https://private-user-images.githubusercontent.com/2724383/312506370-d584bb53-f938-4ea2-8129-243585a137f6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NjYzNTAsIm5iZiI6MTcyMzg2NjA1MCwicGF0aCI6Ii8yNzI0MzgzLzMxMjUwNjM3MC1kNTg0YmI1My1mOTM4LTRlYTItODEyOS0yNDM1ODVhMTM3ZjYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTdUMDM0MDUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODQ2MDdjNTMwMDQzNTMwMmQxZmQ0MTMxNjkzOTE1NWUwYzFhOGUxNWU1Y2E5OGFkNzg5NDZmY2I0OTQxZmYyMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.VAAwGXjcIcElPsoXCCx2Qi3QgqVqKZFgc1RUnHHbGDA)
其中最后一列Tags字段是 VARIANT 类型,tags中的键值对是由业务无脑写入,无法提前预设,可能为空,可能不一致。
使用
SELECT * from LogChunk_1 where Tags['tag_key1'] is not null and CAST(tags['tag_key1'] as text) MATCH_ANY 'tag_val1' order by
TimeDESC limit 10
查询便会报如下 `SQL 错误errCode = 2, detailMessage = (172.16.56.137)[CANCELLED]failed to initialize storage reader. tablet=17136, res=[INTERNAL_ERROR]Not found field_name, field_name:Tags.tag_key1, schema:[Thread(8), Tags(9), Source(5), tags.tag_key1(-1), Title(6), Level(3), Time(2), CreateDate(1), Message(7), IP(4), AppId(0)]
What You Expected?
希望查询时能过滤掉没有对应子列的数据,而不是直接报错
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: