(p []byte, off int64)
| 139 | } |
| 140 | |
| 141 | func (wr *walReaderAt) ReadAt(p []byte, off int64) (int, error) { |
| 142 | if err := wr.ctx.Err(); err != nil { |
| 143 | return 0, err |
| 144 | } |
| 145 | |
| 146 | // parquet-go will call ReadAt when reading data from a parquet file. |
| 147 | n, err := wr.r.ReadAt(p, off) |
| 148 | // ReadAt can read less than len(p) bytes in some cases |
| 149 | wr.bytesRead.Add(uint64(n)) |
| 150 | |
| 151 | if isFatalError(err) { |
| 152 | return 0, err |
| 153 | } |
| 154 | |
| 155 | return n, err |
| 156 | } |
| 157 | |
| 158 | func (wr *walReaderAt) BytesRead() uint64 { |
| 159 | return wr.bytesRead.Load() |
nothing calls this directly
no test coverage detected