Skip to content

Commit 94b322f

Browse files
committed
Rename PythonOutputFrame to PandasOutputFrame
1 parent 5690bf0 commit 94b322f

File tree

8 files changed

+28
-29
lines changed

8 files changed

+28
-29
lines changed

cpp/arcticdb/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ set(arcticdb_srcs
239239
pipeline/input_tensor_frame.hpp
240240
pipeline/pipeline_common.hpp
241241
pipeline/pipeline_utils.hpp
242-
pipeline/python_output_frame.hpp
242+
pipeline/pandas_output_frame.cpp
243243
pipeline/query.hpp
244244
pipeline/read_options.hpp
245245
pipeline/read_options.hpp
@@ -439,7 +439,7 @@ set(arcticdb_srcs
439439
pipeline/index_segment_reader.cpp
440440
pipeline/index_utils.cpp
441441
pipeline/pipeline_context.cpp
442-
pipeline/python_output_frame.cpp
442+
pipeline/pandas_output_frame.cpp
443443
pipeline/query.cpp
444444
pipeline/read_frame.cpp
445445
pipeline/slicing.cpp

cpp/arcticdb/entity/read_result.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@
1212
#include <arcticdb/util/constructors.hpp>
1313
#include <arcticdb/entity/protobufs.hpp>
1414
#include <arcticdb/entity/frame_and_descriptor.hpp>
15-
#include <arcticdb/pipeline/python_output_frame.hpp>
15+
#include <arcticdb/pipeline/pandas_output_frame.hpp>
1616
#include <arcticdb/util/memory_tracing.hpp>
1717
#include <arcticdb/arrow/arrow_utils.hpp>
1818

1919
#include <vector>
2020

2121
namespace arcticdb {
2222

23-
// TODO: Rename the PythonOutputFrame to PandasOutputFrame
24-
using OutputFrame = std::variant<pipelines::PythonOutputFrame, ArrowOutputFrame>;
23+
using OutputFrame = std::variant<pipelines::PandasOutputFrame, ArrowOutputFrame>;
2524

2625
struct ARCTICDB_VISIBILITY_HIDDEN ReadResult {
2726
ReadResult(
@@ -84,7 +83,7 @@ inline ReadResult create_python_read_result(
8483
if (output_format == OutputFormat::ARROW) {
8584
return ArrowOutputFrame{segment_to_arrow_data(result.frame_), names_from_segment(result.frame_)};
8685
} else {
87-
return pipelines::PythonOutputFrame{result.frame_, output_format};
86+
return pipelines::PandasOutputFrame{result.frame_, output_format};
8887
}
8988
}();
9089
util::print_total_mem_usage(__FILE__, __LINE__, __FUNCTION__);

cpp/arcticdb/pipeline/python_output_frame.cpp renamed to cpp/arcticdb/pipeline/pandas_output_frame.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
* As of the Change Date specified in that file, in accordance with the Business Source License, use of this software will be governed by the Apache License, version 2.0.
66
*/
77

8-
#include <arcticdb/pipeline/python_output_frame.hpp>
8+
#include <arcticdb/pipeline/pandas_output_frame.hpp>
99
#include <arcticdb/entity/performance_tracing.hpp>
1010
#include <arcticdb/util/memory_tracing.hpp>
1111
#include <arcticdb/column_store/column_utils.hpp>
1212

1313
namespace arcticdb::pipelines {
1414

15-
PythonOutputFrame::PythonOutputFrame(const SegmentInMemory &frame, OutputFormat output_format) :
15+
PandasOutputFrame::PandasOutputFrame(const SegmentInMemory &frame, OutputFormat output_format) :
1616
module_data_(ModuleData::instance()),
1717
frame_(frame),
1818
names_(frame.fields().size() - frame.descriptor().index().field_count()),
1919
index_columns_(frame.descriptor().index().field_count()),
2020
output_format_(output_format) {
21-
ARCTICDB_SAMPLE_DEFAULT(PythonOutputFrameCtor)
21+
ARCTICDB_SAMPLE_DEFAULT(PandasOutputFrameCtor)
2222
const auto field_count = frame.descriptor().index().field_count();
2323
// works because we ensure that the index must be fetched
2424
for (std::size_t c = 0; c < field_count; ++c) {
@@ -29,7 +29,7 @@ PythonOutputFrame::PythonOutputFrame(const SegmentInMemory &frame, OutputFormat
2929
}
3030
}
3131

32-
PythonOutputFrame::~PythonOutputFrame() {
32+
PandasOutputFrame::~PandasOutputFrame() {
3333
if(frame_.is_null())
3434
return;
3535

@@ -62,7 +62,7 @@ PythonOutputFrame::~PythonOutputFrame() {
6262
}
6363
}
6464

65-
std::shared_ptr<FrameDataWrapper> PythonOutputFrame::arrays(py::object &ref) {
65+
std::shared_ptr<FrameDataWrapper> PandasOutputFrame::arrays(py::object &ref) {
6666
if(auto cached = arrays_.lock())
6767
return cached;
6868

@@ -71,7 +71,7 @@ std::shared_ptr<FrameDataWrapper> PythonOutputFrame::arrays(py::object &ref) {
7171
return generated;
7272
}
7373

74-
py::array PythonOutputFrame::array_at(std::size_t col_pos, py::object &anchor) {
74+
py::array PandasOutputFrame::array_at(std::size_t col_pos, py::object &anchor) {
7575
return arcticdb::detail::array_at(frame_, col_pos, output_format_, anchor);
7676
}
7777

cpp/arcticdb/pipeline/python_output_frame.hpp renamed to cpp/arcticdb/pipeline/pandas_output_frame.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ namespace arcticdb::pipelines {
1414

1515
namespace py = pybind11;
1616

17-
struct ARCTICDB_VISIBILITY_HIDDEN PythonOutputFrame {
17+
struct ARCTICDB_VISIBILITY_HIDDEN PandasOutputFrame {
1818

19-
PythonOutputFrame(const SegmentInMemory& frame, OutputFormat output_format);
19+
PandasOutputFrame(const SegmentInMemory& frame, OutputFormat output_format);
2020

21-
~PythonOutputFrame();
21+
~PandasOutputFrame();
2222

23-
ARCTICDB_MOVE_ONLY_DEFAULT(PythonOutputFrame)
23+
ARCTICDB_MOVE_ONLY_DEFAULT(PandasOutputFrame)
2424

2525
std::shared_ptr<FrameDataWrapper> arrays(py::object &ref);
2626

cpp/arcticdb/pipeline/read_pipeline.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <arcticdb/entity/performance_tracing.hpp>
1313
#include <arcticdb/util/bitset.hpp>
1414
#include <arcticdb/pipeline/frame_slice.hpp>
15-
#include <arcticdb/pipeline/python_output_frame.hpp>
15+
#include <arcticdb/pipeline/pandas_output_frame.hpp>
1616
#include <arcticdb/pipeline/query.hpp>
1717
#include <arcticdb/pipeline/index_segment_reader.hpp>
1818
#include <arcticdb/pipeline/pipeline_context.hpp>

cpp/arcticdb/stream/incompletes.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <arcticdb/pipeline/write_options.hpp>
1717

1818
namespace arcticdb::pipelines {
19-
struct PythonOutputFrame;
19+
struct PandasOutputFrame;
2020
struct InputTensorFrame;
2121
using FilterRange = std::variant<std::monostate, IndexRange, RowRange>;
2222
}

cpp/arcticdb/version/python_bindings.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -240,21 +240,21 @@ void register_bindings(py::module &version, py::exception<arcticdb::ArcticExcept
240240
py::class_<FrameDataWrapper, std::shared_ptr<FrameDataWrapper>>(version, "FrameDataWrapper")
241241
.def_property_readonly("data", &FrameDataWrapper::data);
242242

243-
using PythonOutputFrame = arcticdb::pipelines::PythonOutputFrame;
244-
py::class_<PythonOutputFrame>(version, "PythonOutputFrame")
243+
using PandasOutputFrame = arcticdb::pipelines::PandasOutputFrame;
244+
py::class_<PandasOutputFrame>(version, "PandasOutputFrame")
245245
//.def(py::init<const SegmentInMemory&, OutputFormat output_format, std::shared_ptr<BufferHolder>>())
246246
.def(py::init<>([](const SegmentInMemory& segment_in_memory, OutputFormat output_format) {
247-
return PythonOutputFrame(segment_in_memory, output_format);
247+
return PandasOutputFrame(segment_in_memory, output_format);
248248
}))
249249
.def_property_readonly("value", [](py::object & obj){
250-
auto& fd = obj.cast<PythonOutputFrame&>();
250+
auto& fd = obj.cast<PandasOutputFrame&>();
251251
return fd.arrays(obj);
252252
})
253-
.def_property_readonly("offset", [](PythonOutputFrame& self) {
253+
.def_property_readonly("offset", [](PandasOutputFrame& self) {
254254
return self.frame().offset(); })
255-
.def_property_readonly("names", &PythonOutputFrame::names, py::return_value_policy::reference)
256-
.def_property_readonly("index_columns", &PythonOutputFrame::index_columns, py::return_value_policy::reference)
257-
.def_property_readonly("row_count", [](PythonOutputFrame& self) {
255+
.def_property_readonly("names", &PandasOutputFrame::names, py::return_value_policy::reference)
256+
.def_property_readonly("index_columns", &PandasOutputFrame::index_columns, py::return_value_policy::reference)
257+
.def_property_readonly("row_count", [](PandasOutputFrame& self) {
258258
return self.frame().row_count();
259259
});
260260

@@ -748,7 +748,7 @@ void register_bindings(py::module &version, py::exception<arcticdb::ArcticExcept
748748
const auto& tsd_proto = tsd.proto();
749749
ReadResult res{
750750
vit,
751-
PythonOutputFrame{
751+
PandasOutputFrame{
752752
SegmentInMemory{tsd.as_stream_descriptor()}, read_options.output_format()},
753753
read_options.output_format(),
754754
tsd_proto.normalization(),
@@ -819,7 +819,7 @@ void register_bindings(py::module &version, py::exception<arcticdb::ArcticExcept
819819
output.reserve(results.size());
820820
for(auto& [vit, tsd] : results) {
821821
const auto& tsd_proto = tsd.proto();
822-
ReadResult res{vit, PythonOutputFrame{
822+
ReadResult res{vit, PandasOutputFrame{
823823
SegmentInMemory{tsd.as_stream_descriptor()}, read_options.output_format()},
824824
read_options.output_format(),
825825
tsd_proto.normalization(),

python/arcticdb/toolbox/library_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from arcticdb_ext.storage import KeyType
1313
from arcticdb_ext.stream import SegmentInMemory
1414
from arcticdb_ext.tools import LibraryTool as LibraryToolImpl
15-
from arcticdb_ext.version_store import AtomKey, PythonOutputFrame, RefKey
15+
from arcticdb_ext.version_store import AtomKey, RefKey
1616
from arcticdb.version_store._normalization import denormalize_dataframe, normalize_dataframe
1717

1818
VariantKey = Union[AtomKey, RefKey]

0 commit comments

Comments
 (0)