Skip to content

feat(optimizer)!: annotate regexpreplace for mysql - #7948

Open
PiyaDaswadkar wants to merge 2 commits into
tobymao:mainfrom
PiyaDaswadkar:piya/annotate-function-regexpreplace
Open

feat(optimizer)!: annotate regexpreplace for mysql#7948
PiyaDaswadkar wants to merge 2 commits into
tobymao:mainfrom
PiyaDaswadkar:piya/annotate-function-regexpreplace

Conversation

@PiyaDaswadkar

Copy link
Copy Markdown
Contributor

This PR annotate the function RegexpReplace for mysql

https://dev.mysql.com/doc/refman/9.7/en/regexp.html#function_regexp-replace

Screenshot From 2026-07-24 20-57-28

Comment thread sqlglot/typing/mysql.py Outdated
Comment thread sqlglot/typing/mysql.py
):
return self._set_type(expression, exp.DType.LONGBLOB)

return self._set_type(expression, exp.DType.LONGTEXT)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of defaulting to returning a LONGTEXT, let's condition that on all three args being one of the text types and have the fallback type be exp.DType.UNKNOWN

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.

2 participants