Skip to content

fix: export TCK execution plans correctly - #260

Open
Bewear777 wants to merge 1 commit into
vesoft-inc:masterfrom
Bewear777:fix/tck-execution-plan-export
Open

Bewear777 wants to merge 1 commit into
vesoft-inc:masterfrom
Bewear777:fix/tck-execution-plan-export

Conversation

@Bewear777

@Bewear777 Bewear777 commented Nov 2, 2026 •

Copy link
Copy Markdown

What type of PR is this?

  • bug
  • feature
  • enhancement
  • documentation

What problem(s) does this PR solve?

Issue(s) number:

Fixes #259

Description:

When exporting an execution plan using FORMAT="tck", NebulaGraph Console displays the execution plan correctly in the terminal but writes only an empty line to the exported file.

The issue occurs because the rendered TCK output is not assigned to the local variable s, which is used by the common file export logic.

How do you solve it?

  • Assign the result of p.renderByTck(rows) to the local variable s.
  • Print s instead of calling p.renderByTck(rows) directly.

This ensures that the TCK execution plan is correctly written to the exported file.

Special notes for your reviewer, ex. impact of this fix, design document, etc:

  • Minimal change limited to printer/plan_desc_printer.go.
  • No changes to the TCK rendering format or existing terminal output.
  • Existing row, dot, and dot:struct behavior remains unchanged.
  • No public API changes.
  • No backward compatibility impact.
  • Automated tests have not been run.

Reproduction:

:profile /tmp/plan-tck.txt
EXPLAIN FORMAT="tck" YIELD 1;

:sleep 1
:quit

ls -l /tmp/plan-tck.txt

wc -c /tmp/plan-tck.txt

cat /tmp/plan-tck.txt

Before this fix, the exported file contains only an empty line.

After this fix, the exported file contains the complete TCK-formatted execution plan.

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 this pull request may close these issues.

TCK execution plan export writes an empty line

1 participant