Skip to content

go tests starts failed on nightly build with error Cost Based Optimizer could not be applied to this query #16938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rekby opened this issue Apr 8, 2025 · 2 comments · Fixed by #17009
Assignees

Comments

@rekby
Copy link
Member

rekby commented Apr 8, 2025

operation/INTERNAL_ERROR (code = 400030, address = localhost:2136, nodeID = 1, issues = [{#1060 'Execution' [{11:20 => #8001 'Cost Based Optimizer could not be applied to this query: couldn't load statistics'}]},{#1 'yql/essentials/minikql/computation/llvm16/mkql_computation_node_graph.cpp:199: GetEntryPoint(): requirement index < Runtime2ComputationEntryPoints.size() && (!require || Runtime2ComputationEntryPoints[index]) failed. Pattern nodes can not get computation node by index: 0, require: 1, Runtime2ComputationEntryPoints size: 2'},{#2019 'Query invalidated on scheme/internal error during Data execution'}]) 

for example:

https://productionresultssa13.blob.core.windows.net/actions-results/4c831095-510f-4424-92b9-909126faf54b/workflow-job-run-5386c5ad-788f-5843-be40-f113d9c0a1c9/logs/job/job-logs.txt?rsct=text%2Fplain&se=2025-04-08T15%3A16%3A14Z&sig=pvW0Ry5OY4XbhZnyAAXP3D0KgloZ1IwCJf6cYjLQFSo%3D&ske=2025-04-09T02%3A07%3A33Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-04-08T14%3A07%3A33Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-01-05&sp=r&spr=https&sr=b&st=2025-04-08T15%3A06%3A09Z&sv=2025-01-05

ie starts from today:
https://github.com/ydb-platform/ydb-go-sdk/actions/workflows/tests.yml?query=event%3Aschedule

when runs switch to stable red.

same tests work fine with stable versions of YDB
https://github.com/ydb-platform/ydb-go-sdk/actions/runs/14332729272/job/40172254228

--!syntax_v1
PRAGMA TablePathPrefix("/local/TestTableCrossJoin");

/* sub-query */
$data1 = (SELECT * FROM table1);
$data2 = Cast(AsList() As List<Struct<p2: Utf8>>);

/* query */
UPSERT INTO table2
SELECT d1.p1 AS p1,
FROM $data1 AS d1
CROSS JOIN AS_TABLE($data2) AS d2;

SELECT COUNT(*) FROM $data1;

@rekby rekby changed the title tests starts failed on nightly build go tests starts failed on nightly build with error Cost Based Optimizer could not be applied to this query Apr 8, 2025
@rekby
Copy link
Member Author

rekby commented Apr 8, 2025

workaround:

set

table_service_config:
  enable_oltp_sink: false

in ydbd config

@nikvas0
Copy link
Collaborator

nikvas0 commented Apr 9, 2025

Found bug. The problem is joining table with EmptyIterator, thus creating unused input (table). We should optimize unused inputs.

P.S. Bug can be reproduced without enabled sink

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

Successfully merging a pull request may close this issue.

2 participants