MCPcopy Create free account
hub / github.com/apache/arrow / Equals

Method Equals

cpp/src/arrow/table.cc:577–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575} // namespace
576
577bool Table::Equals(const Table& other, const EqualOptions& opts) const {
578 if (this == &other) {
579 if (CanIgnoreNan(*schema_, opts)) {
580 return true;
581 }
582 } else {
583 if (num_columns() != other.num_columns() || num_rows_ != other.num_rows()) {
584 return false;
585 } else if (opts.use_schema() &&
586 !schema_->Equals(*other.schema(), opts.use_metadata())) {
587 return false;
588 }
589 }
590
591 for (int i = 0; i < this->num_columns(); i++) {
592 if (!this->column(i)->Equals(other.column(i), opts)) {
593 return false;
594 }
595 }
596 return true;
597}
598
599Result<std::shared_ptr<Table>> Table::CombineChunks(MemoryPool* pool) const {
600 const int ncolumns = num_columns();

Callers 6

AddColumnMethod · 0.45
SetColumnMethod · 0.45
ValidateMetaMethod · 0.45
FromRecordBatchesMethod · 0.45
ConcatenateTablesFunction · 0.45
PromoteTableToSchemaFunction · 0.45

Calls 6

CanIgnoreNanFunction · 0.85
num_columnsFunction · 0.70
num_columnsMethod · 0.45
num_rowsMethod · 0.45
schemaMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected