We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a88356c commit 54db5efCopy full SHA for 54db5ef
server/src/querycache.rs
@@ -332,9 +332,17 @@ impl QueryCacheManager {
332
let time_partition = STREAM_INFO.get_time_partition(table_name)?;
333
let props = parquet_writer_props(time_partition.clone(), 0, HashMap::new()).build();
334
335
+ let sch = if let Some(record) = records.first() {
336
+ record.schema()
337
+ } else {
338
+ // the record batch is empty, do not cache and return early
339
+ return Ok(());
340
+ };
341
+
342
343
let mut arrow_writer = AsyncArrowWriter::try_new(
344
parquet_file,
- STREAM_INFO.schema(table_name).expect("schema present"),
345
+ sch,
346
Some(props),
347
)?;
348
0 commit comments