Skip to content

Commit

Permalink
spi-search:fix query_metrics adv_query.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljl committed May 31, 2024
1 parent eb10bf5 commit 19b2bac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/spi/spi-search/src/serv/pg/search_pg_item_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ pub async fn search(search_req: &mut SearchItemSearchReq, funs: &TardisFunsInst,
{
order_fragments.push(format!("{} {}", sort_item.field, sort_item.order.to_sql()));
} else {
order_fragments.push(format!("ext -> '{}' {}", sort_item.field, sort_item.order.to_sql()));
order_fragments.push(format!("ext ->> '{}' {}", sort_item.field, sort_item.order.to_sql()));
}
}
}
Expand Down Expand Up @@ -1183,7 +1183,7 @@ pub async fn query_metrics(query_req: &SearchQueryMetricsReq, funs: &TardisFunsI
} else if ext_item.op == BasicQueryOpKind::IsNull {
sql_and_where.push(format!("fact.{} is null", ext_item.field));
} else if ext_item.op == BasicQueryOpKind::IsNotNull {
sql_and_where.push(format!("(fact.{} is not null or {} != '')", ext_item.field, ext_item.field));
sql_and_where.push(format!("(fact.{} is not null)", ext_item.field));
} else if ext_item.op == BasicQueryOpKind::IsNullOrEmpty {
sql_and_where.push(format!("(fact.{} is null or {} = '')", ext_item.field, ext_item.field));
} else {
Expand Down

0 comments on commit 19b2bac

Please sign in to comment.