Skip to content

Commit

Permalink
Use default params in ColumnLayoutRelationData::CreateFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
polyntsov committed Mar 24, 2022
1 parent 6355a5a commit fde2b87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
5 changes: 0 additions & 5 deletions src/model/ColumnLayoutRelationData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ std::vector<int> ColumnLayoutRelationData::GetTuple(int tuple_index) const {
return tuple;
}

std::unique_ptr<ColumnLayoutRelationData> ColumnLayoutRelationData::CreateFrom(
CSVParser& file_input, bool is_null_eq_null) {
return CreateFrom(file_input, is_null_eq_null, -1, -1);
}

std::unique_ptr<ColumnLayoutRelationData> ColumnLayoutRelationData::CreateFrom(
CSVParser& file_input, bool is_null_eq_null, int max_cols, long max_rows) {
auto schema = std::make_unique<RelationalSchema>(file_input.GetRelationName(), is_null_eq_null);
Expand Down
12 changes: 7 additions & 5 deletions src/model/ColumnLayoutRelationData.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> GetTuple(int tuple_index) const;
[[nodiscard]] unsigned int GetNumRows() const final {
return column_data_[0].GetProbingTable().size();
}
[[nodiscard]] std::vector<int> GetTuple(int tuple_index) const;

static std::unique_ptr<ColumnLayoutRelationData> CreateFrom(CSVParser& file_input,
bool is_null_eq_null);
static std::unique_ptr<ColumnLayoutRelationData> 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);
};

0 comments on commit fde2b87

Please sign in to comment.