From c6f42cf3042682bb3aa787638aea5c83851ff5cb Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 28 May 2021 06:12:47 -0400 Subject: [PATCH] refactor: Remove unnecessary code (#1573) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- server/src/db/chunk.rs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/server/src/db/chunk.rs b/server/src/db/chunk.rs index 6251207d46..3f2888149b 100644 --- a/server/src/db/chunk.rs +++ b/server/src/db/chunk.rs @@ -231,27 +231,12 @@ impl PartitionChunk for DbChunk { .table_schema(table_name, selection) .context(MutableBufferChunk), State::ReadBuffer { chunk, .. } => { - // TODO: Andrew -- I think technically this reordering - // should be happening inside the read buffer, but - // we'll see when we get to read_filter as the same - // issue will appear when actually reading columns - // back - let needs_sort = matches!(selection, Selection::All); - // Get the expected output schema for the read_filter operation - let mut schema = chunk + chunk .read_filter_table_schema(table_name, selection) .context(ReadBufferChunkError { chunk_id: self.id(), - })?; - - // Ensure the order of the output columns is as - // specified - if needs_sort { - schema = schema.sort_fields_by_name() - } - - Ok(schema) + }) } State::ParquetFile { chunk, .. } => { chunk