Skip to content

Conversation

@stebloev
Copy link
Member

@stebloev stebloev commented Dec 18, 2025

Add FulltextContains broken tests

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

This PR adds tests that expected to pass but now are broken: empty result and query without text column.

@stebloev stebloev self-assigned this Dec 18, 2025
@stebloev stebloev marked this pull request as ready for review December 18, 2025 12:35
@stebloev stebloev requested review from a team as code owners December 18, 2025 12:35
Copilot AI review requested due to automatic review settings December 18, 2025 12:35
@github-actions
Copy link

github-actions bot commented Dec 18, 2025

🟢 2025-12-18 12:35:53 UTC The validation of the Pull Request description is successful.

@ydbot
Copy link
Collaborator

ydbot commented Dec 18, 2025

Run Extra Tests

Run additional tests for this PR. You can customize:

  • Test Size: small, medium, large (default: all)
  • Test Targets: any directory path (default: ydb/)
  • Sanitizers: ASAN, MSAN, TSAN
  • Coredumps: enable for debugging (default: off)
  • Additional args: custom ya make arguments

▶ Run tests

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

2025-12-18 12:37:21 UTC Pre-commit check linux-x86_64-release-asan for 96fdf5c has started.
2025-12-18 12:37:38 UTC Artifacts will be uploaded here
2025-12-18 12:39:49 UTC ya make is running...
🟢 2025-12-18 12:47:25 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-12-18 12:47:31 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

2025-12-18 12:38:12 UTC Pre-commit check linux-x86_64-relwithdebinfo for 96fdf5c has started.
2025-12-18 12:38:19 UTC Artifacts will be uploaded here
2025-12-18 12:40:33 UTC ya make is running...
🟡 2025-12-18 12:50:50 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
451 449 0 2 0 0

2025-12-18 12:50:56 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-12-18 13:10:29 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
52 (only retried tests) 50 0 2 0 0

2025-12-18 13:10:35 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-12-18 13:11:46 UTC Some tests failed, follow the links below.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
52 (only retried tests) 50 0 2 0 0

🟢 2025-12-18 13:11:53 UTC Build successful.
🟢 2025-12-18 13:12:18 UTC ydbd size 2.3 GiB changed* by +30.5 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: db482c7 merge: 96fdf5c diff diff %
ydbd size 2 479 301 864 Bytes 2 479 333 072 Bytes +30.5 KiB +0.001%
ydbd stripped size 527 517 248 Bytes 527 521 952 Bytes +4.6 KiB +0.001%

*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
Contributor

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 adds two new unit tests for the FulltextContains functionality that document currently broken behavior. According to the PR description, these tests are expected to pass but currently fail.

  • Adds test for empty result scenarios when searching for non-existent text in fulltext indexes
  • Adds test for queries that use fulltext index without selecting the text column in the result

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +2310 to +2367
Y_UNIT_TEST(SelectWithFulltextContainsEmpty) {
auto kikimr = Kikimr();
auto db = kikimr.GetQueryClient();

CreateTexts(db);
AddIndex(db);

const auto querySettings = NYdb::NQuery::TExecuteQuerySettings().ClientTimeout(TDuration::Seconds(10));

{
TString query = R"sql(
SELECT `Key`, `Text`
FROM `/Root/Texts` VIEW `fulltext_idx`
WHERE FullText::FulltextContains(`Text`, "404 not found")
ORDER BY `Key`;
)sql";
auto result = db.ExecuteQuery(query, NYdb::NQuery::TTxControl::NoTx(), querySettings).ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
CompareYson(R"([])", NYdb::FormatResultSetYson(result.GetResultSet(0)));
}

UpsertSomeTexts(db);

{
TString query = R"sql(
SELECT `Key`, `Text`
FROM `/Root/Texts` VIEW `fulltext_idx`
WHERE FullText::FulltextContains(`Text`, "404 not found")
ORDER BY `Key`;
)sql";
auto result = db.ExecuteQuery(query, NYdb::NQuery::TTxControl::NoTx(), querySettings).ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
CompareYson(R"([])", NYdb::FormatResultSetYson(result.GetResultSet(0)));
}
}
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

This test is documented in the PR description as "broken" and "expected to pass but now are broken." Consider adding a comment in the test explaining this is a known failing test case and what behavior is expected. This helps future maintainers understand that the test failure is intentional until the underlying issue is fixed. For example, add a comment like: "// TODO: This test currently fails due to [issue reference]. Expected behavior is to return empty result when searching for non-existent text."

Copilot uses AI. Check for mistakes.
Comment on lines +2346 to +2385
Y_UNIT_TEST(SelectWithFulltextContainsWithoutTextField) {
auto kikimr = Kikimr();
auto db = kikimr.GetQueryClient();

CreateTexts(db);
UpsertSomeTexts(db);
AddIndex(db);

TString query = R"sql(
SELECT `Key`
FROM `/Root/Texts` VIEW `fulltext_idx`
WHERE FullText::FulltextContains(`Text`, "dog")
ORDER BY `Key`;
)sql";
auto result = db.ExecuteQuery(query, NYdb::NQuery::TTxControl::NoTx()).ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
}
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

This test is documented in the PR description as "broken" and "expected to pass but now are broken." Consider adding a comment in the test explaining this is a known failing test case that queries without selecting the text field from the fulltext index. Additionally, the test only asserts that the query returns SUCCESS status but doesn't verify the actual result data. Consider adding an assertion to verify the expected result, such as checking that the correct Key values are returned (e.g., Key 200 which contains "dog"). For example: "// TODO: This test currently fails. Expected behavior is to successfully execute queries that only select the Key column without the Text column from fulltext index views."

Copilot uses AI. Check for mistakes.
Comment on lines +2360 to +2384
auto result = db.ExecuteQuery(query, NYdb::NQuery::TTxControl::NoTx()).ExtractValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The test only verifies that the query execution status is SUCCESS but doesn't assert the actual results. Based on the test data from UpsertSomeTexts (which inserts "Dogs love foxes." with Key 200), when searching for "dog", the test should verify that Key 200 is returned. Consider adding an assertion to check the result content, similar to how other tests in the file use CompareYson to validate the result set.

Copilot uses AI. Check for mistakes.
@stebloev stebloev force-pushed the add-fulltext-broken-tests branch from 02e5486 to 5ba5c5f Compare December 19, 2025 08:40
@github-actions
Copy link

github-actions bot commented Dec 19, 2025

2025-12-19 08:42:20 UTC Pre-commit check linux-x86_64-release-asan for 52cc61f has started.
2025-12-19 08:42:36 UTC Artifacts will be uploaded here
2025-12-19 08:44:40 UTC ya make is running...
🟢 2025-12-19 09:04:34 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-12-19 09:04:40 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

2025-12-19 08:44:19 UTC Pre-commit check linux-x86_64-relwithdebinfo for 52cc61f has started.
2025-12-19 08:44:35 UTC Artifacts will be uploaded here
2025-12-19 08:46:46 UTC ya make is running...
🟡 2025-12-19 09:14:58 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
451 447 0 3 0 1

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

Details

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
53 (only retried tests) 49 0 3 0 1

2025-12-19 09:29:00 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-12-19 09:40:01 UTC Some tests failed, follow the links below.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
53 (only retried tests) 49 0 3 0 1

🟢 2025-12-19 09:40:09 UTC Build successful.
🔴 2025-12-19 09:40:30 UTC ydbd size 2.3 GiB changed* by +2.9 MiB, which is >= 2.0 MiB vs main: Alert

ydbd size dash main: 6182d7e merge: 52cc61f diff diff %
ydbd size 2 480 159 704 Bytes 2 483 228 792 Bytes +2.9 MiB +0.124%
ydbd stripped size 527 986 784 Bytes 528 645 152 Bytes +642.9 KiB +0.125%

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

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

2 participants