Skip to content

Commit a202c8f

Browse files
gorloffslavaBwL1289
authored andcommitted
+ Fix building in C++ 20 and 23 language modes
1 parent a10d3cc commit a202c8f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/pyarrow/src/arrow/python/serialize.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ Status Append(PyObject* context, PyObject* elem, SequenceBuilder* builder,
6969
// SequenceBuilders. The resulting Arrow representation
7070
// can be obtained via the Finish method.
7171
class DictBuilder {
72-
public:
72+
public:
7373
explicit DictBuilder(MemoryPool* pool = nullptr) : keys_(pool), vals_(pool) {
7474
builder_.reset(new StructBuilder(struct_({field("keys", dense_union(FieldVector{})),
7575
field("vals", dense_union(FieldVector{}))}),
7676
pool, {keys_.builder(), vals_.builder()}));
7777
}
7878

7979
// Builder for the keys of the dictionary
80-
SequenceBuilder& keys() { return keys_; }
80+
SequenceBuilder& keys() { return (SequenceBuilder)keys_; }
8181
// Builder for the values of the dictionary
82-
SequenceBuilder& vals() { return vals_; }
82+
SequenceBuilder& vals() { return (SequenceBuilder)vals_; }
8383

8484
// Construct an Arrow StructArray representing the dictionary.
8585
// Contains a field "keys" for the keys and "vals" for the values.
@@ -88,8 +88,8 @@ class DictBuilder {
8888
std::shared_ptr<StructBuilder> builder() { return builder_; }
8989

9090
private:
91-
SequenceBuilder keys_;
92-
SequenceBuilder vals_;
91+
std::any keys_;
92+
std::any vals_;
9393
std::shared_ptr<StructBuilder> builder_;
9494
};
9595

0 commit comments

Comments
 (0)