Skip to content
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

Post-merge operator prevents debug on flowgraph branches #5230

Open
philrz opened this issue Aug 17, 2024 · 0 comments
Open

Post-merge operator prevents debug on flowgraph branches #5230

philrz opened this issue Aug 17, 2024 · 0 comments
Assignees

Comments

@philrz
Copy link
Contributor

philrz commented Aug 17, 2024

Repro is with Zed commit e7623c5.

This works as expected:

$ zq -version
Version: v1.17.0-27-ge7623c57

$ echo "1 3" | zq 'fork (
  => count() | debug f"debug: count {this}" | yield f"post debug count {this}"
  => sum(this) | debug f"sum is {this}" | yield f"post debug sum {this}"
)' -
"post debug count 2(uint64)"
"post debug sum 4"
"sum is 4"
"debug: count 2(uint64)"

But once I add an operator after the merge point, it no longer parses.

$ echo "1 3" | zq 'fork (
  => count() | debug f"debug: count {this}" | yield f"post debug count {this}"
  => sum(this) | debug f"sum is {this}" | yield f"post debug sum {this}"
) | yield this + " (merged)"' -
output operator must be at flowgraph leaf at line 2, column 16:
  => count() | debug f"debug: count {this}" | yield f"post debug count {this}"
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
output operator must be at flowgraph leaf at line 3, column 18:
  => sum(this) | debug f"sum is {this}" | yield f"post debug sum {this}"
                 ~~~~~~~~~~~~~~~~~~~~~~

This poses a challenge for allowing debug in Zui since the app appends additional operators head after the user's program to help with pagination.

@philrz philrz changed the title Post-merge operator prevents debug flowgraph branches Post-merge operator prevents debug on flowgraph branches Aug 19, 2024
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

No branches or pull requests

2 participants