mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
fix: panic when result is empty (#26)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::collections::HashMap;
|
||||
use segment::{message::Track, Client, Message};
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::infra::config::{CONFIG, INSTANCE_ID, STREAM_SCHEMAS, TELEMETRY_CLIENT, USERS, VERSION};
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ pub async fn search(
|
||||
Some(batches) => batches.to_owned(),
|
||||
None => Vec::new(),
|
||||
};
|
||||
if !result_query.is_empty() {
|
||||
if !result_query.is_empty() && !result_query[0].is_empty() {
|
||||
let schema = result_query[0][0].schema();
|
||||
let ipc_options = ipc::writer::IpcWriteOptions::default();
|
||||
let ipc_options = ipc_options
|
||||
|
||||
Reference in New Issue
Block a user