From 683af2368eba03795d7aaeecfd8b596d1e07b610 Mon Sep 17 00:00:00 2001 From: Michael Polyntsov Date: Thu, 24 Mar 2022 20:31:52 +0300 Subject: [PATCH] Use default params in ColumnLayoutRelationData::CreateFrom --- src/model/ColumnLayoutRelationData.cpp | 5 ----- src/model/ColumnLayoutRelationData.h | 12 +++++++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/model/ColumnLayoutRelationData.cpp b/src/model/ColumnLayoutRelationData.cpp index a8edfa9d11..ca0259c3c8 100644 --- a/src/model/ColumnLayoutRelationData.cpp +++ b/src/model/ColumnLayoutRelationData.cpp @@ -19,11 +19,6 @@ std::vector ColumnLayoutRelationData::GetTuple(int tuple_index) const { return tuple; } -std::unique_ptr ColumnLayoutRelationData::CreateFrom( - CSVParser& file_input, bool is_null_eq_null) { - return CreateFrom(file_input, is_null_eq_null, -1, -1); -} - std::unique_ptr ColumnLayoutRelationData::CreateFrom( CSVParser& file_input, bool is_null_eq_null, int max_cols, long max_rows) { auto schema = std::make_unique(file_input.GetRelationName(), is_null_eq_null); diff --git a/src/model/ColumnLayoutRelationData.h b/src/model/ColumnLayoutRelationData.h index 094011175b..ee08d02614 100755 --- a/src/model/ColumnLayoutRelationData.h +++ b/src/model/ColumnLayoutRelationData.h @@ -19,12 +19,14 @@ class ColumnLayoutRelationData final : public RelationData { using RelationData::AbstractRelationData; - unsigned int GetNumRows() const final { return column_data_[0].GetProbingTable().size(); } - std::vector GetTuple(int tuple_index) const; + [[nodiscard]] unsigned int GetNumRows() const final { + return column_data_[0].GetProbingTable().size(); + } + [[nodiscard]] std::vector GetTuple(int tuple_index) const; static std::unique_ptr CreateFrom(CSVParser& file_input, - bool is_null_eq_null); - static std::unique_ptr CreateFrom( - CSVParser& file_input, bool is_null_eq_null, int max_cols, long max_rows); + bool is_null_eq_null, + int max_cols = -1, + long max_rows = -1); };