Skip to content

Conversation

GrigoriyPA
Copy link
Collaborator

Changelog entry

Supported stream lookup join with external data sources in YDB

Changelog category

  • New feature

Description for reviewers

@GrigoriyPA GrigoriyPA requested review from a team as code owners September 26, 2025 15:24
@GrigoriyPA GrigoriyPA marked this pull request as draft September 26, 2025 15:24
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements stream lookup join functionality with external data sources in YDB. The feature enables efficient lookup joins where streaming data from one source is joined with lookup data from external sources like S3 or generic connectors.

Key changes include:

  • Refactored stream lookup join logic to common DQ optimization modules
  • Added support for external data sources in streaming queries
  • Implemented caching and validation mechanisms for stream lookup operations

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ydb/library/yql/dq/opt/dq_opt_phy.cpp Moved stream lookup join rewrite logic to common DQ optimization module
ydb/library/yql/dq/opt/dq_opt_join.cpp Moved stream equi-join with lookup rewrite logic to common DQ join module
ydb/core/protos/kqp_physical.proto Added new TKqpPhyCnDqSourceStreamLookup protobuf message for stream lookup connections
ydb/core/kqp/query_compiler/kqp_query_compiler.cpp Added stream lookup connection handling in query compilation
ydb/library/yql/providers/generic/connector/libcpp/ut_helpers/connector_client_mock.h Enhanced mock connector client to support multiple responses and validation options
ydb/core/kqp/ut/federated_query/datastreams/datastreams_ut.cpp Added comprehensive tests for stream lookup join functionality
Comments suppressed due to low confidence (2)

ydb/core/kqp/ut/federated_query/datastreams/datastreams_ut.cpp:1

  • Remove or update the outdated comment '// temp replace with yt source' which doesn't reflect the actual functionality of this function that handles generic lookup sources.
#include <ydb/core/external_sources/external_source.h>

ydb/core/kqp/ut/federated_query/datastreams/datastreams_ut.cpp:1

  • The removal of FillWithDefaults() call from constructor creates inconsistency. Either remove the FillWithDefaults() method entirely or ensure it's called consistently across similar classes in this file.
#include <ydb/core/external_sources/external_source.h>

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

github-actions bot commented Sep 26, 2025

2025-09-26 15:26:27 UTC Pre-commit check linux-x86_64-relwithdebinfo for cb0f56f has started.
2025-09-26 15:26:31 UTC Artifacts will be uploaded here
2025-09-26 15:30:31 UTC ya make is running...
🔴 2025-09-26 16:22:35 UTC Build failed, see the logs. Also see fail summary
🟡 2025-09-26 16:22:47 UTC ydbd size 2.2 GiB changed* by +1.1 MiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 3db6964 merge: cb0f56f diff diff %
ydbd size 2 395 787 520 Bytes 2 396 935 000 Bytes +1.1 MiB +0.048%
ydbd stripped size 512 340 680 Bytes 512 499 464 Bytes +155.1 KiB +0.031%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Sep 26, 2025

2025-09-26 15:27:04 UTC Pre-commit check linux-x86_64-release-asan for cb0f56f has started.
2025-09-26 15:27:08 UTC Artifacts will be uploaded here
2025-09-26 15:31:15 UTC ya make is running...
🔴 2025-09-26 16:28:10 UTC Build failed, see the logs. Also see fail summary

Copy link

🟢 2025-09-26 15:27:54 UTC The validation of the Pull Request description is successful.

@GrigoriyPA GrigoriyPA requested a review from Copilot September 26, 2025 16:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

github-actions bot commented Sep 26, 2025

2025-09-26 16:49:25 UTC Pre-commit check linux-x86_64-release-asan for e686d60 has started.
2025-09-26 16:50:13 UTC Artifacts will be uploaded here
2025-09-26 16:54:53 UTC ya make is running...
2025-09-26 18:00:33 UTC Check cancelled

Copy link

github-actions bot commented Sep 26, 2025

2025-09-26 16:49:32 UTC Pre-commit check linux-x86_64-relwithdebinfo for e686d60 has started.
2025-09-26 16:50:14 UTC Artifacts will be uploaded here
2025-09-26 16:54:22 UTC ya make is running...
2025-09-26 18:00:33 UTC Check cancelled

Copy link

github-actions bot commented Sep 26, 2025

2025-09-26 18:02:12 UTC Pre-commit check linux-x86_64-relwithdebinfo for bc4b96d has started.
2025-09-26 18:02:55 UTC Artifacts will be uploaded here
2025-09-26 18:07:35 UTC ya make is running...
🟡 2025-09-26 19:28:13 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40747 37980 0 6 2728 33

2025-09-26 19:28:23 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-09-26 19:41:26 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
250 (only retried tests) 227 0 2 0 21

2025-09-26 19:41:29 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-09-26 19:52:18 UTC Some tests failed, follow the links below.

Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
218 (only retried tests) 198 0 2 0 18

🟢 2025-09-26 19:52:22 UTC Build successful.
🟢 2025-09-26 19:52:39 UTC ydbd size 2.2 GiB changed* by -41.0 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 580503a merge: bc4b96d diff diff %
ydbd size 2 397 008 592 Bytes 2 396 966 568 Bytes -41.0 KiB -0.002%
ydbd stripped size 512 481 192 Bytes 512 504 840 Bytes +23.1 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@GrigoriyPA GrigoriyPA requested a review from uzhastik September 26, 2025 18:04
Copy link

github-actions bot commented Sep 26, 2025

2025-09-26 18:05:03 UTC Pre-commit check linux-x86_64-release-asan for bc4b96d has started.
2025-09-26 18:05:35 UTC Artifacts will be uploaded here
2025-09-26 18:10:28 UTC ya make is running...
🟡 2025-09-26 20:15:28 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
17783 17314 0 192 244 33

🟢 2025-09-26 20:15:33 UTC Build successful.
🟢 2025-09-26 20:15:57 UTC ydbd size 3.7 GiB changed* by -111.0 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 580503a merge: bc4b96d diff diff %
ydbd size 3 986 662 296 Bytes 3 986 548 664 Bytes -111.0 KiB -0.003%
ydbd stripped size 1 485 964 128 Bytes 1 486 036 992 Bytes +71.2 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@GrigoriyPA GrigoriyPA added the rebase-and-check Rebase PR with the current base branch and check label Sep 29, 2025
@github-actions github-actions bot removed the rebase-and-check Rebase PR with the current base branch and check label Sep 29, 2025
Copy link

github-actions bot commented Sep 29, 2025

2025-09-29 09:06:24 UTC Pre-commit check linux-x86_64-release-asan for 4860041 has started.
2025-09-29 09:06:41 UTC Artifacts will be uploaded here
2025-09-29 09:10:43 UTC ya make is running...
🟡 2025-09-29 11:50:49 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
17777 17383 0 111 256 27

🟢 2025-09-29 11:51:00 UTC Build successful.
🟢 2025-09-29 11:51:22 UTC ydbd size 3.7 GiB changed* by -115.0 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 234f6d5 merge: 4860041 diff diff %
ydbd size 3 987 121 616 Bytes 3 987 003 896 Bytes -115.0 KiB -0.003%
ydbd stripped size 1 486 129 568 Bytes 1 486 198 336 Bytes +67.2 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Sep 29, 2025

2025-09-29 09:08:27 UTC Pre-commit check linux-x86_64-relwithdebinfo for 4860041 has started.
2025-09-29 09:09:02 UTC Artifacts will be uploaded here
2025-09-29 09:13:58 UTC ya make is running...
🟡 2025-09-29 11:24:06 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40749 37866 0 6 2844 33

2025-09-29 11:24:16 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-09-29 11:40:41 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
498 (only retried tests) 475 0 2 0 21

2025-09-29 11:40:44 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-09-29 11:51:41 UTC Some tests failed, follow the links below.

Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
215 (only retried tests) 196 0 2 0 17

🟢 2025-09-29 11:51:43 UTC Build successful.
🟢 2025-09-29 11:52:02 UTC ydbd size 2.2 GiB changed* by -44.9 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 234f6d5 merge: 4860041 diff diff %
ydbd size 2 397 243 112 Bytes 2 397 197 088 Bytes -44.9 KiB -0.002%
ydbd stripped size 512 537 768 Bytes 512 557 416 Bytes +19.2 KiB +0.004%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@yumkam
Copy link
Collaborator

yumkam commented Sep 29, 2025

Тесты на slj в ydb/tests/fq/generic/streaming надо запускать руками (large)

ya test --buid relwithdebinfo -ttt ydb/tests/fq/generic/streaming

Copy link

github-actions bot commented Sep 30, 2025

2025-09-30 09:58:18 UTC Pre-commit check linux-x86_64-release-asan for 647ef53 has started.
2025-09-30 09:58:33 UTC Artifacts will be uploaded here
2025-09-30 10:02:42 UTC ya make is running...
2025-09-30 10:46:27 UTC Check cancelled

Copy link

github-actions bot commented Sep 30, 2025

2025-09-30 09:58:48 UTC Pre-commit check linux-x86_64-relwithdebinfo for 647ef53 has started.
2025-09-30 09:59:03 UTC Artifacts will be uploaded here
2025-09-30 10:03:05 UTC ya make is running...
2025-09-30 10:46:27 UTC Check cancelled

Copy link

github-actions bot commented Sep 30, 2025

2025-09-30 10:47:56 UTC Pre-commit check linux-x86_64-relwithdebinfo for 0e06a2a has started.
2025-09-30 10:48:09 UTC Artifacts will be uploaded here
2025-09-30 10:52:17 UTC ya make is running...
🟡 2025-09-30 13:04:07 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40769 37869 0 4 2855 41

2025-09-30 13:04:17 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-09-30 13:19:27 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
580 (only retried tests) 444 0 0 109 27

🟢 2025-09-30 13:19:30 UTC Build successful.
🟢 2025-09-30 13:19:48 UTC ydbd size 2.2 GiB changed* by -41.1 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: c20a722 merge: 0e06a2a diff diff %
ydbd size 2 397 639 400 Bytes 2 397 597 280 Bytes -41.1 KiB -0.002%
ydbd stripped size 512 619 304 Bytes 512 642 856 Bytes +23.0 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Sep 30, 2025

2025-09-30 10:47:56 UTC Pre-commit check linux-x86_64-release-asan for 0e06a2a has started.
2025-09-30 10:48:12 UTC Artifacts will be uploaded here
2025-09-30 10:52:28 UTC ya make is running...
🟡 2025-09-30 13:48:51 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
17787 17224 0 205 328 30

🟢 2025-09-30 13:48:57 UTC Build successful.
🟢 2025-09-30 13:49:21 UTC ydbd size 3.7 GiB changed* by -111.0 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: c20a722 merge: 0e06a2a diff diff %
ydbd size 3 987 806 896 Bytes 3 987 693 264 Bytes -111.0 KiB -0.003%
ydbd stripped size 1 486 385 088 Bytes 1 486 457 952 Bytes +71.2 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@GrigoriyPA GrigoriyPA force-pushed the YQ-4602-support-stream-lookup-join branch from 0f05be8 to 0eb6597 Compare September 30, 2025 16:27
Copy link

github-actions bot commented Sep 30, 2025

2025-09-30 16:28:29 UTC Pre-commit check linux-x86_64-relwithdebinfo for fef652b has started.
2025-09-30 16:28:35 UTC Artifacts will be uploaded here
2025-09-30 16:31:57 UTC Check cancelled

Copy link

github-actions bot commented Sep 30, 2025

2025-09-30 16:30:44 UTC Pre-commit check linux-x86_64-release-asan for fef652b has started.
2025-09-30 16:31:17 UTC Artifacts will be uploaded here
2025-09-30 16:31:57 UTC Check cancelled

Copy link

github-actions bot commented Sep 30, 2025

2025-09-30 16:33:21 UTC Pre-commit check linux-x86_64-release-asan for d4a9274 has started.
2025-09-30 16:33:24 UTC Artifacts will be uploaded here
2025-09-30 16:37:37 UTC ya make is running...
🟡 2025-09-30 19:13:07 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
17788 17347 0 147 272 22

🟢 2025-09-30 19:13:12 UTC Build successful.
🟢 2025-09-30 19:13:34 UTC ydbd size 3.7 GiB changed* by -123.8 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 38df75e merge: d4a9274 diff diff %
ydbd size 3 988 034 392 Bytes 3 987 907 648 Bytes -123.8 KiB -0.003%
ydbd stripped size 1 486 466 880 Bytes 1 486 530 720 Bytes +62.3 KiB +0.004%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Sep 30, 2025

2025-09-30 16:35:48 UTC Pre-commit check linux-x86_64-relwithdebinfo for d4a9274 has started.
2025-09-30 16:36:04 UTC Artifacts will be uploaded here
2025-09-30 16:40:19 UTC ya make is running...
🟡 2025-09-30 18:55:02 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40771 37893 0 2 2847 29

2025-09-30 18:55:11 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-09-30 19:10:43 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
449 (only retried tests) 316 0 0 109 24

🟢 2025-09-30 19:10:46 UTC Build successful.
🟢 2025-09-30 19:11:03 UTC ydbd size 2.2 GiB changed* by -48.7 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 38df75e merge: d4a9274 diff diff %
ydbd size 2 397 780 600 Bytes 2 397 730 712 Bytes -48.7 KiB -0.002%
ydbd stripped size 512 649 512 Bytes 512 668 488 Bytes +18.5 KiB +0.004%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@GrigoriyPA GrigoriyPA marked this pull request as ready for review October 1, 2025 15:51
Copy link

github-actions bot commented Oct 1, 2025

2025-10-01 16:06:48 UTC Pre-commit check linux-x86_64-relwithdebinfo for 5aa7200 has started.
2025-10-01 16:07:22 UTC Artifacts will be uploaded here
2025-10-01 16:12:19 UTC ya make is running...
🟡 2025-10-01 18:17:38 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40793 37904 0 2 2854 33

2025-10-01 18:17:48 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-10-01 18:34:34 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
431 (only retried tests) 299 0 1 108 23

2025-10-01 18:34:41 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-10-01 18:49:09 UTC Some tests failed, follow the links below.

Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
350 (only retried tests) 220 0 1 108 21

🟢 2025-10-01 18:49:12 UTC Build successful.
🟢 2025-10-01 18:49:29 UTC ydbd size 2.2 GiB changed* by -36.6 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: df38aca merge: 5aa7200 diff diff %
ydbd size 2 398 041 440 Bytes 2 398 003 928 Bytes -36.6 KiB -0.002%
ydbd stripped size 512 663 400 Bytes 512 690 760 Bytes +26.7 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@GrigoriyPA GrigoriyPA added the rebase-and-check Rebase PR with the current base branch and check label Oct 1, 2025
@github-actions github-actions bot removed the rebase-and-check Rebase PR with the current base branch and check label Oct 1, 2025
Copy link

github-actions bot commented Oct 1, 2025

2025-10-01 20:42:51 UTC Pre-commit check linux-x86_64-relwithdebinfo for 2c0991c has started.
2025-10-01 20:43:04 UTC Artifacts will be uploaded here
2025-10-01 20:47:10 UTC ya make is running...
🟡 2025-10-01 22:08:28 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40801 38025 0 5 2739 32

2025-10-01 22:08:38 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-10-01 22:22:43 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
574 (only retried tests) 549 0 1 1 23

2025-10-01 22:22:46 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-10-01 22:36:57 UTC Tests successful.

Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
487 (only retried tests) 465 0 0 1 21

🟢 2025-10-01 22:37:00 UTC Build successful.
🟢 2025-10-01 22:37:17 UTC ydbd size 2.2 GiB changed* by -44.6 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: c2fb1c1 merge: 2c0991c diff diff %
ydbd size 2 397 293 344 Bytes 2 397 247 672 Bytes -44.6 KiB -0.002%
ydbd stripped size 512 514 216 Bytes 512 533 416 Bytes +18.8 KiB +0.004%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Oct 1, 2025

2025-10-01 20:43:10 UTC Pre-commit check linux-x86_64-release-asan for 2c0991c has started.
2025-10-01 20:43:25 UTC Artifacts will be uploaded here
2025-10-01 20:47:41 UTC ya make is running...
🟡 2025-10-01 23:32:17 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
17809 17320 0 162 301 26

🟢 2025-10-01 23:32:22 UTC Build successful.
🟢 2025-10-01 23:32:45 UTC ydbd size 3.7 GiB changed* by -115.3 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: c2fb1c1 merge: 2c0991c diff diff %
ydbd size 3 987 251 088 Bytes 3 987 132 984 Bytes -115.3 KiB -0.003%
ydbd stripped size 1 486 102 976 Bytes 1 486 170 912 Bytes +66.3 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation


return Build<TCoEquiJoin>(ctx, node.Pos()).Add(std::move(args)).Done();
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сверил, кусок идентичный исходному (с точностью до typeCtx), ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants