Skip to content

[BugFix] Python inline UDF creation failing when file='inline' is omitted#72359

Merged
stdpain merged 2 commits into
StarRocks:mainfrom
s4ch1n:pyudffix
Apr 30, 2026
Merged

[BugFix] Python inline UDF creation failing when file='inline' is omitted#72359
stdpain merged 2 commits into
StarRocks:mainfrom
s4ch1n:pyudffix

Conversation

@s4ch1n

@s4ch1n s4ch1n commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Why I'm doing:

When creating an inline Starrocks Python UDF using the AS $$ ... $$ syntax, the documentation states that file='inline' is optional. However, omitting it causes the following error at creation time - inline function file should be 'inline'

What I'm doing:

StringUtils.equalsIgnoreCase(null, "inline") returns false, so when file is omitted (objectFile == null) and UDF creation failing with inline function file should be 'inline'

Using default value as 'inline as per documentation'.

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
    • This pr needs auto generate documentation
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.1
    • 4.0
    • 3.5
    • 3.4

@s4ch1n s4ch1n requested a review from a team as a code owner April 29, 2026 22:12
@CLAassistant

CLAassistant commented Apr 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@mergify mergify Bot assigned s4ch1n Apr 29, 2026
@s4ch1n s4ch1n changed the title Fix inline Python UDF creation failing when file='inline' is omitted [BugFix] Python inline UDF creation failing when file='inline' is omitted Apr 29, 2026
Signed-off-by: stdpain <34912776+stdpain@users.noreply.github.com>
@github-actions github-actions Bot added the 4.1 label Apr 30, 2026
@CelerData-Reviewer

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14708fc4ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown
Contributor

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

@github-actions

Copy link
Copy Markdown
Contributor

[FE Incremental Coverage Report]

pass : 1 / 1 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/sql/analyzer/CreateFunctionAnalyzer.java 1 1 100.00% []

@github-actions

Copy link
Copy Markdown
Contributor

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@stdpain stdpain merged commit 697ec65 into StarRocks:main Apr 30, 2026
86 of 91 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@Mergifyio backport branch-4.1

@github-actions github-actions Bot removed the 4.1 label Apr 30, 2026
@mergify

mergify Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

backport branch-4.1

✅ Backports have been created

Details

Cherry-pick of 697ec65 has failed:

On branch mergify/bp/branch-4.1/pr-72359
Your branch is up to date with 'origin/branch-4.1'.

You are currently cherry-picking commit 697ec65fd4.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   fe/fe-core/src/main/java/com/starrocks/sql/analyzer/CreateFunctionAnalyzer.java

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   fe/fe-core/src/test/java/com/starrocks/sql/analyzer/CreateFunctionStmtAnalyzerTest.java

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

wanpengfei-git pushed a commit that referenced this pull request May 5, 2026
…tted (backport #72359) (#72412)

Signed-off-by: stdpain <34912776+stdpain@users.noreply.github.com>
Co-authored-by: sachin <sachinjose.mec@gmail.com>
Co-authored-by: stdpain <34912776+stdpain@users.noreply.github.com>
robd003 pushed a commit to robd003/starrocks that referenced this pull request May 6, 2026
xiangguangyxg pushed a commit to xiangguangyxg/starrocks that referenced this pull request May 7, 2026
…tted (StarRocks#72359)

Signed-off-by: xiangguangyxg <xiangguangyxg@gmail.com>
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.

5 participants