refactor: remove table name from column_names

pull/24376/head
Edd Robinson 2021-06-30 09:43:41 +01:00
parent fef160e24f
commit 5737c9d962
2 changed files with 2 additions and 12 deletions

View File

@ -280,11 +280,8 @@ impl Chunk {
/// determines that all the columns in the row group are already contained
/// in the results buffer. Callers can skip this behaviour by passing in
/// an empty `BTreeSet`.
///
/// TODO(edd): remove `table_name`
pub fn column_names(
&self,
_table_name: &str,
predicate: Predicate,
only_columns: Selection<'_>,
dst: BTreeSet<String>,
@ -1078,12 +1075,7 @@ mod test {
chunk.upsert_table("Utopia", rb);
let result = chunk
.column_names(
"Utopia",
Predicate::default(),
Selection::All,
BTreeSet::new(),
)
.column_names(Predicate::default(), Selection::All, BTreeSet::new())
.unwrap();
assert_eq!(
@ -1094,7 +1086,6 @@ mod test {
// Testing predicates
let result = chunk
.column_names(
"Utopia",
Predicate::new(vec![BinaryExpr::from(("time", "=", 222222_i64))]),
Selection::All,
BTreeSet::new(),

View File

@ -342,7 +342,6 @@ impl QueryChunk for DbChunk {
predicate: &Predicate,
columns: Selection<'_>,
) -> Result<Option<StringSet>, Self::Error> {
let table_name = self.table_name.as_ref();
match &self.state {
State::MutableBuffer { chunk, .. } => {
if !predicate.is_empty() {
@ -362,7 +361,7 @@ impl QueryChunk for DbChunk {
Ok(Some(
chunk
.column_names(table_name, rb_predicate, columns, BTreeSet::new())
.column_names(rb_predicate, columns, BTreeSet::new())
.context(ReadBufferChunkError {
chunk_id: self.id(),
})?,