| 60 | class SimpleTable : public Table { |
| 61 | public: |
| 62 | SimpleTable(std::shared_ptr<Schema> schema, |
| 63 | std::vector<std::shared_ptr<ChunkedArray>> columns, int64_t num_rows = -1) |
| 64 | : columns_(std::move(columns)) { |
| 65 | schema_ = std::move(schema); |
| 66 | if (num_rows < 0) { |
| 67 | if (columns_.size() == 0) { |
| 68 | num_rows_ = 0; |
| 69 | } else { |
| 70 | num_rows_ = columns_[0]->length(); |
| 71 | } |
| 72 | } else { |
| 73 | num_rows_ = num_rows; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | SimpleTable(std::shared_ptr<Schema> schema, |
| 78 | const std::vector<std::shared_ptr<Array>>& columns, int64_t num_rows = -1) { |