Skip to content

feat(bigframes): UDF transpiler handles some control flow#17558

Open
TrevorBergeron wants to merge 10 commits into
mainfrom
tbergeron_more_py_funcs
Open

feat(bigframes): UDF transpiler handles some control flow#17558
TrevorBergeron wants to merge 10 commits into
mainfrom
tbergeron_more_py_funcs

Conversation

@TrevorBergeron

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces control flow graph (CFG) construction and topological sorting to transpile Python bytecode with conditional branches and jumps into BigFrames expressions, supported by extensive unit tests. The review feedback highlights several critical improvements, including handling the JUMP_BACKWARD_NO_INTERRUPT instruction to prevent loops from being silently compiled, optimizing CFG building by precomputing instruction offsets to avoid O(N^2) sorting overhead, removing dead code for STORE_FAST, and correcting a misleading stack underflow error message.

Comment thread packages/bigframes/bigframes/core/bytecode.py Outdated
Comment thread packages/bigframes/bigframes/core/bytecode.py Outdated
Comment thread packages/bigframes/bigframes/core/bytecode.py
Comment thread packages/bigframes/bigframes/core/bytecode.py Outdated
Comment thread packages/bigframes/bigframes/core/bytecode.py Outdated
Comment thread packages/bigframes/bigframes/core/bytecode.py Outdated
Comment thread packages/bigframes/bigframes/core/bytecode.py Outdated
@TrevorBergeron TrevorBergeron requested a review from tswast June 24, 2026 19:42
@TrevorBergeron TrevorBergeron marked this pull request as ready for review June 24, 2026 19:42
@TrevorBergeron TrevorBergeron requested review from a team as code owners June 24, 2026 19:42
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.

1 participant