gpt4 book ai didi

druid - 如何添加多个德鲁伊过滤器

转载 作者:行者123 更新时间:2023-12-05 08:41:11 24 4
gpt4 key购买 nike

例如我有以下 Druid 查询:

"filter": {
"type": "and",
"fields": [
{
"type": "selector",
"dimension": "city",
"value": "landon"
},
{
"type": "selector",
"dimension": "name",
"value": "Tom"
}
]
}

现在我想添加一个 NOT 字段,我应该把它插入哪里?映射 SQL 类似:从用户中选择 *,其中 city='landon' 和 name="Tom"and title<>"teacher"。

最佳答案

我得到的答案如下:

"filter": {
"type": "and",
"fields": [
{
"type": "selector",
"dimension": "city",
"value": "landon"
},
{
"type": "selector",
"dimension": "name",
"value": "Tom"
},
{
"field": {
"type": "selector",
"dimension": "title",
"value": "teacher"
},
"type": "not"
}
]
}

关于druid - 如何添加多个德鲁伊过滤器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51643984/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com