Skip to content

Commit

Permalink
Merge #9778 #10161 (#10197)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyisaev2 authored Oct 8, 2024
1 parent a6f3237 commit 1402742
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ namespace NKikimr::NKqp {
// step 3: ReadSplits
std::vector<ui16> colData = {10, 20, 30, 40, 50};
clientMock->ExpectReadSplits()
.Filtering(NYql::NConnector::NApi::TReadSplitsRequest::FILTERING_OPTIONAL)
.Split()
.Description("some binary description")
.Select()
Expand Down Expand Up @@ -219,6 +220,7 @@ namespace NKikimr::NKqp {

// step 3: ReadSplits
clientMock->ExpectReadSplits()
.Filtering(NYql::NConnector::NApi::TReadSplitsRequest::FILTERING_OPTIONAL)
.Split()
.Description("some binary description")
.Select()
Expand Down Expand Up @@ -310,6 +312,7 @@ namespace NKikimr::NKqp {

// step 3: ReadSplits
clientMock->ExpectReadSplits()
.Filtering(NYql::NConnector::NApi::TReadSplitsRequest::FILTERING_OPTIONAL)
.Split()
.Description("some binary description")
.Select()
Expand Down Expand Up @@ -414,6 +417,7 @@ namespace NKikimr::NKqp {
std::vector<i32> filterColumnData = {42, 24};
// clang-format off
clientMock->ExpectReadSplits()
.Filtering(NYql::NConnector::NApi::TReadSplitsRequest::FILTERING_OPTIONAL)
.Split()
.Description("some binary description")
.Select(select)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ namespace NYql::NDq {
// Prepare request
NConnector::NApi::TReadSplitsRequest request;
request.set_format(NConnector::NApi::TReadSplitsRequest::ARROW_IPC_STREAMING);
request.set_filtering(NConnector::NApi::TReadSplitsRequest::FILTERING_OPTIONAL);
request.mutable_splits()->Reserve(Splits_.size());

for (const auto& split : Splits_) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,22 @@ message TReadSplitsRequest {
// If empty, the connector will return the split data from the very beginning.
TContinuation continuation = 6;

enum EFiltering {
FILTERING_UNSPECIFIED = 0;
// If Connector cannot push down the predicate to the data source completely
// (due to the lack of data type support, for example), it doesn't apply filter at all
// and returns the full result of `SELECT columns FROM table` (no WHERE clause).
// It's YDB's duty to filter the output on its own side.
FILTERING_OPTIONAL = 1;
// If Connector cannot push down the predicate to the data source completely,
// it terminates the request and returns an error.
FILTERING_MANDATORY = 2;
}

// Determines various modes of server behavior in the context of predicate pushdown.
// If not set, the default value is `FILTERING_OPTIONAL`.
EFiltering filtering = 7;

reserved 5;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ namespace NYql::NConnector::NTest {
DATA_SOURCE_INSTANCE_SUBBUILDER();
SUBPROTO_BUILDER(Split, add_splits, NApi::TSplit, TSplitBuilder<TBuilder>);
SETTER(Format, format);
SETTER(Filtering, filtering);

TReadSplitsResultBuilder<TBuilder> Result() {
return TReadSplitsResultBuilder<TBuilder>(ResponseResult_, this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- 8123
fq-connector-go:
container_name: fq-tests-ch-fq-connector-go
image: ghcr.io/ydb-platform/fq-connector-go:v0.5.7-rc.1@sha256:f12475f346105d7bc630e7b85f51dce980bf9833f6ce0625c6f1191b1a1de923
image: ghcr.io/ydb-platform/fq-connector-go:v0.5.11-rc.1@sha256:c018b2f1151fac8a86aaf79950ccdffaa72150785f303096d9a466f50eb62498
ports:
- 2130
volumes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
fq-connector-go:
container_name: fq-tests-pg-fq-connector-go
image: ghcr.io/ydb-platform/fq-connector-go:v0.5.7-rc.1@sha256:f12475f346105d7bc630e7b85f51dce980bf9833f6ce0625c6f1191b1a1de923
image: ghcr.io/ydb-platform/fq-connector-go:v0.5.11-rc.1@sha256:c018b2f1151fac8a86aaf79950ccdffaa72150785f303096d9a466f50eb62498
ports:
- 2130
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
echo \"$$(dig fq-tests-ydb-ydb +short) fq-tests-ydb-ydb\" >> /etc/hosts; cat /etc/hosts;
/opt/ydb/bin/fq-connector-go server -c /opt/ydb/cfg/fq-connector-go.yaml"
container_name: fq-tests-ydb-fq-connector-go
image: ghcr.io/ydb-platform/fq-connector-go:v0.5.7-rc.1@sha256:f12475f346105d7bc630e7b85f51dce980bf9833f6ce0625c6f1191b1a1de923
image: ghcr.io/ydb-platform/fq-connector-go:v0.5.11-rc.1@sha256:c018b2f1151fac8a86aaf79950ccdffaa72150785f303096d9a466f50eb62498
ports:
- 2130
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- 8123
fq-connector-go:
container_name: fq-tests-join-fq-connector-go
image: ghcr.io/ydb-platform/fq-connector-go:v0.5.7-rc.1@sha256:f12475f346105d7bc630e7b85f51dce980bf9833f6ce0625c6f1191b1a1de923
image: ghcr.io/ydb-platform/fq-connector-go:v0.5.11-rc.1@sha256:c018b2f1151fac8a86aaf79950ccdffaa72150785f303096d9a466f50eb62498
ports:
- 2130
volumes:
Expand Down

0 comments on commit 1402742

Please sign in to comment.