| 38 | namespace { |
| 39 | |
| 40 | bool DataTypeEquals(const DataTypePtr& left, const DataTypePtr& right) { |
| 41 | if (left->id() == right->id()) { |
| 42 | switch (left->id()) { |
| 43 | case arrow::Type::DECIMAL: { |
| 44 | // For decimal types, the precision/scale isn't part of the signature. |
| 45 | auto dleft = checked_cast<arrow::DecimalType*>(left.get()); |
| 46 | auto dright = checked_cast<arrow::DecimalType*>(right.get()); |
| 47 | return (dleft != NULL) && (dright != NULL) && |
| 48 | (dleft->byte_width() == dright->byte_width()); |
| 49 | } |
| 50 | default: |
| 51 | return left->Equals(right); |
| 52 | } |
| 53 | } else { |
| 54 | return false; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | } // namespace |
| 59 |
no test coverage detected