Skip to content

Commit

Permalink
MINOR: [C++][Parquet] fix dict_length for ReadDictionary when not hav…
Browse files Browse the repository at this point in the history
…ing dict (apache#41344)

### Rationale for this change

`dictionary_length = 0` is used when page doesn't have dictionary, however, this should be a nop.

### What changes are included in this PR?

Change `dictionary_length = 0` to `*dictionary_length = 0`.

### Are these changes tested?

No?

### Are there any user-facing changes?

no

Authored-by: mwish <maplewish117@gmail.com>
Signed-off-by: mwish <maplewish117@gmail.com>
  • Loading branch information
mapleFU authored Apr 25, 2024
1 parent 610ab9c commit 774f10d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/parquet/column_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ class TypedRecordReader : public TypedColumnReaderImpl<DType>,

const void* ReadDictionary(int32_t* dictionary_length) override {
if (this->current_decoder_ == nullptr && !this->HasNextInternal()) {
dictionary_length = 0;
*dictionary_length = 0;
return nullptr;
}
// Verify the current data page is dictionary encoded. The current_encoding_ should
Expand Down

0 comments on commit 774f10d

Please sign in to comment.