| 31 | namespace orc { |
| 32 | |
| 33 | struct ReadRange { |
| 34 | uint64_t offset; |
| 35 | uint64_t length; |
| 36 | |
| 37 | ReadRange() = default; |
| 38 | ReadRange(uint64_t offset, uint64_t length) : offset(offset), length(length) {} |
| 39 | |
| 40 | friend bool operator==(const ReadRange& left, const ReadRange& right) { |
| 41 | return (left.offset == right.offset && left.length == right.length); |
| 42 | } |
| 43 | friend bool operator!=(const ReadRange& left, const ReadRange& right) { |
| 44 | return !(left == right); |
| 45 | } |
| 46 | |
| 47 | bool contains(const ReadRange& other) const { |
| 48 | return (offset <= other.offset && offset + length >= other.offset + other.length); |
| 49 | } |
| 50 | }; |
| 51 | |
| 52 | struct ReadRangeCombiner { |
| 53 | const uint64_t holeSizeLimit; |
no outgoing calls
no test coverage detected