aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivanmorozov <ivanmorozov@yandex-team.com>2023-10-14 19:22:46 +0300
committerivanmorozov <ivanmorozov@yandex-team.com>2023-10-14 19:42:41 +0300
commit500a0e1ae0987bfa4a17c6baa9c978724d7656eb (patch)
treeaaba874702d6d1f331cdd93e7a4ed916fe254fc6
parent3e77d964f6cf05ca5c440f3dac1fc380f5586f7a (diff)
downloadydb-500a0e1ae0987bfa4a17c6baa9c978724d7656eb.tar.gz
KIKIMR-19712: fix validation and add debug info
-rw-r--r--ydb/core/formats/arrow/reader/read_filter_merger.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/ydb/core/formats/arrow/reader/read_filter_merger.h b/ydb/core/formats/arrow/reader/read_filter_merger.h
index 1b89715d58..4347b3d878 100644
--- a/ydb/core/formats/arrow/reader/read_filter_merger.h
+++ b/ydb/core/formats/arrow/reader/read_filter_merger.h
@@ -20,12 +20,12 @@ public:
TSortableScanData() = default;
TSortableScanData(std::shared_ptr<arrow::RecordBatch> batch, const std::vector<std::string>& columns);
- bool IsSameSchema(const std::shared_ptr<arrow::Schema> schema) const {
+ bool IsSameSchema(const std::shared_ptr<arrow::Schema>& schema) const {
if (Fields.size() != (size_t)schema->num_fields()) {
return false;
}
for (ui32 i = 0; i < Fields.size(); ++i) {
- if (Fields[i]->type() != schema->field(i)->type()) {
+ if (!Fields[i]->type()->Equals(schema->field(i)->type())) {
return false;
}
if (Fields[i]->name() != schema->field(i)->name()) {
@@ -37,6 +37,10 @@ public:
NJson::TJsonValue DebugJson(const i32 position) const {
NJson::TJsonValue result = NJson::JSON_MAP;
+ auto& jsonFields = result.InsertValue("fields", NJson::JSON_ARRAY);
+ for (auto&& i : Fields) {
+ jsonFields.AppendValue(i->ToString());
+ }
for (ui32 i = 0; i < Columns.size(); ++i) {
auto& jsonColumn = result["sorting_columns"].AppendValue(NJson::JSON_MAP);
jsonColumn["name"] = Fields[i]->name();