Skip to content

Commit 9cdc396

Browse files
committed
YQ fixed s3 provider win build (#18819)
1 parent cc60f67 commit 9cdc396

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

ydb/library/yql/providers/s3/actors/yql_s3_write_actor.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "yql_s3_write_actor.h"
22
#include "yql_s3_actors_util.h"
3+
#if defined(_linux_) || defined(_darwin_)
34
#include "yql_arrow_column_converters.h"
5+
#endif
46

57
#include <arrow/result.h>
68
#include <arrow/table.h>
@@ -799,6 +801,7 @@ class TS3ScalarWriteActor : public TS3WriteActorBase {
799801
const std::vector<TString> Keys;
800802
};
801803

804+
#if defined(_linux_) || defined(_darwin_)
802805
class TS3BlockWriteActor : public TS3WriteActorBase {
803806
using TBase = TS3WriteActorBase;
804807

@@ -938,6 +941,7 @@ class TS3BlockWriteActor : public TS3WriteActorBase {
938941
TString SerializedData;
939942
std::unique_ptr<parquet::arrow::FileWriter> Writer;
940943
};
944+
#endif
941945

942946
} // namespace
943947

@@ -982,6 +986,7 @@ std::pair<IDqComputeActorAsyncOutput*, NActors::IActor*> CreateS3WriteActor(
982986
return {actor, actor};
983987
}
984988

989+
#if defined(_linux_) || defined(_darwin_)
985990
const auto& arrowSettings = params.GetArrowSettings();
986991

987992
const auto programBuilder = std::make_unique<TProgramBuilder>(typeEnv, functionRegistry);
@@ -1012,6 +1017,10 @@ std::pair<IDqComputeActorAsyncOutput*, NActors::IActor*> CreateS3WriteActor(
10121017

10131018
const auto actor = new TS3BlockWriteActor(std::move(settings), s3Params);
10141019
return {actor, actor};
1020+
#else
1021+
YQL_ENSURE(false, "Block sink is not supported for this platform");
1022+
return {nullptr, nullptr};
1023+
#endif
10151024
}
10161025

10171026
} // namespace NYql::NDq

ydb/library/yql/providers/s3/provider/yql_s3_datasink_type_ann.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include <yql/essentials/core/expr_nodes/yql_expr_nodes.h>
44
#include <yql/essentials/core/yql_opt_utils.h>
5-
#include <ydb/library/yql/providers/s3/actors/yql_arrow_column_converters.h>
65
#include <ydb/library/yql/providers/s3/common/util.h>
76
#include <ydb/library/yql/providers/s3/expr_nodes/yql_s3_expr_nodes.h>
87

ydb/library/yql/providers/s3/provider/yql_s3_provider_impl.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "yql_s3_provider_impl.h"
22

3+
#if defined(_linux_) || defined(_darwin_)
34
#include <ydb/library/yql/providers/s3/actors/yql_arrow_column_converters.h>
5+
#endif
46

57
#include <yql/essentials/providers/common/schema/expr/yql_expr_schema.h>
68

@@ -23,6 +25,7 @@ bool UseBlocksSink(TStringBuf format, const TExprNode::TListType& keys, const TS
2325
return false;
2426
}
2527

28+
#if defined(_linux_) || defined(_darwin_)
2629
if (!keys.empty()) {
2730
if (useblockSink) {
2831
error = "Block sink is not supported for partitioned output";
@@ -57,6 +60,11 @@ bool UseBlocksSink(TStringBuf format, const TExprNode::TListType& keys, const TS
5760
}
5861

5962
return true;
63+
#else
64+
Y_UNUSED(format, keys, outputType, configuration);
65+
error = TStringBuilder() << "Block sink is not supported for this platform";
66+
return true;
67+
#endif
6068
}
6169

6270
}

0 commit comments

Comments
 (0)