Skip to content

fix: bind CALL $params per Eval and keep them in params_type#766

Merged
liulx20 merged 9 commits into
alibaba:mainfrom
liulx20:extension-2
Jul 22, 2026
Merged

fix: bind CALL $params per Eval and keep them in params_type#766
liulx20 merged 9 commits into
alibaba:mainfrom
liulx20:extension-2

Conversation

@liulx20

@liulx20 liulx20 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Fixes

liulx20 and others added 2 commits July 17, 2026 20:00
Return a fresh CallFuncInput from bindParams so cached Pipelines do not
mutate shared unbound input under concurrency. Emit typed DynamicParam on
procedure arguments and parse them in plan_parser so HTTP clients keep
passing $params through.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rely on typed DynamicParam alone for name/type metadata, matching plan_parser.

Co-authored-by: Cursor <cursoragent@cursor.com>
@liulx20
liulx20 requested a review from Copilot July 21, 2026 11:25
Register TEST_ECHO_PARAM in the out-of-tree fixture, add a Python case, and drop the redundant in-process C++ unittest.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI 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.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR updates CALL procedure execution to bind $params per Eval (supporting concurrent evaluation) and ensures procedure-call dynamic params contribute to params_type for typed parameter handling.

Changes:

  • Introduces a typed DynamicParam representation for procedure call arguments and wires it through proto + query conversion.
  • Refactors CallFuncInputBase::bindParams to return a per-Eval bound input, updating procedure-call and GDS operators accordingly.
  • Replaces the C++ unit test with an out-of-tree extension + Python test, and updates the extension-test workflow to run it.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/python_bind/tests/test_call_params.py Adds a Python extension test for CALL $param behavior (param present/missing + literal).
tests/unittest/test_call_params.cc Removes the prior gtest-based coverage for CALL $param behavior.
tests/unittest/CMakeLists.txt Drops test_call_params from the C++ unittest suite.
src/execution/execute/plan_parser.cc Collects typed dynamic params from procedure call arguments into params_type.
src/execution/execute/ops/retrieve/procedure_call.cc Executes against per-Eval bound inputs returned from bindParams.
src/execution/execute/ops/retrieve/gds_algo.cc Aligns GDS operator with new per-Eval bindParams contract.
src/compiler/gopt/g_query_converter.cpp Emits typed common.DynamicParam for $param procedure-call args (prefers signature type when binder type is UNKNOWN).
proto/stored_procedure.proto Adds common.DynamicParam param = 5 to procedure Argument oneof.
include/neug/compiler/function/neug_call_function.h Changes bindParams to a const method returning a unique_ptr (per-Eval input).
extension/test_out_of_tree/test_out_of_tree_extension.cc Adds TEST_ECHO_PARAM function to validate CALL $param binding via an out-of-tree extension.
.github/workflows/neug-extension-test.yml Attempts to run the new Python test within the extension test workflow.

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

Comment thread .github/workflows/neug-extension-test.yml
Comment thread include/neug/compiler/function/neug_call_function.h
Comment thread tests/unittest/CMakeLists.txt Outdated
liulx20 and others added 6 commits July 21, 2026 19:43
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Fail loudly instead of echoing an empty string when ParamsMap omits the key.

Co-authored-by: Cursor <cursoragent@cursor.com>
Always use callFunc.parameterTypes instead of binder UNKNOWN with fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@liulx20
liulx20 merged commit f49b5e0 into alibaba:main Jul 22, 2026
15 checks passed
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.

feat(extension): support dynamic parameters as CALL inputs

3 participants