Skip to content

Add QueryServiceUdf Function-shaped invoke option contract - #151

Open
deepti-sf wants to merge 1 commit into
forcedotcom:mainfrom
deepti-sf:WI-24331548
Open

deepti-sf wants to merge 1 commit into
forcedotcom:mainfrom
deepti-sf:WI-24331548

Conversation

@deepti-sf

Copy link
Copy Markdown
Contributor

Summary

Adds Function-shaped invoke option support for QueryServiceUdf, following the existing SearchIndexChunking pattern:

  • constants.py: adds QueryServiceUdf to USE_IN_FEATURE_MAPPING_FOR_CONNECT_API and REQUEST_TYPE_TO_FEATURE, so cli.py's infer_use_in_feature() detects and tags this feature at deploy time.
  • New function/feature_types/query_service_udf.py: QueryServiceUdfV1Request/Response (+ Row/Argument/Result) Pydantic models — a synchronous, per-row scalar-in/scalar-out UDF invocation contract.

Known gap (not in scope for this PR): no FEATURE_TEMPLATE_MAPPING entry yet — that requires a full templates/function/query_service_udf/ scaffold (Dockerfile, entrypoint, requirements).

Provisional: the request/response shape was authored while the Query Service integration's dispatch mechanism (AlwaysOn vs. code-interpreter branch) is still unresolved on the design side, and may need revision once that lands.

Companion changes:

  • Off-core schema: a360/cdp-openapis#4454
  • Off-core service: a360/byoc-service#938
  • GUS: W-24331548 (child epic W-24249847)

Test plan

  • Existing SDK test suite passes
  • Manual infer_use_in_feature() check with a QueryServiceUdfV1Request/Response pair

Adds QueryServiceUdfV1Request/Response Pydantic models (following the
SearchIndexChunkingV1Request/Response pattern) plus the
REQUEST_TYPE_TO_FEATURE and USE_IN_FEATURE_MAPPING_FOR_CONNECT_API
entries needed for cli.py's infer_use_in_feature() to detect and tag
this feature at deploy time. No FEATURE_TEMPLATE_MAPPING scaffold yet
- see Known Gaps in ADD-INVOKE-OPTION-QueryServiceUdf.md.
@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! It looks like @deepti-sf is an internal user so signing the CLA is not required. However, we need to confirm this.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant