You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "jerry-024 (via GitHub)" <gi...@apache.org> on 2025/06/06 05:56:50 UTC
[PR] [core] fix: add function name validate [paimon]
jerry-024 opened a new pull request, #5702:
URL: https://github.com/apache/paimon/pull/5702
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
<!-- What is the purpose of the change -->
Function names are allowed to contain characters such as letters (a-zA-Z), numbers (0-9), dots (.), hyphens (-), underscores (_), and must contain letters.
### Tests
- RESTCatalogTest.testValidateFunctionName
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] fix: add function name validate [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #5702:
URL: https://github.com/apache/paimon/pull/5702
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] fix: add function name validate [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #5702:
URL: https://github.com/apache/paimon/pull/5702#issuecomment-2948412816
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] fix: add function name validate [paimon]
Posted by "jerry-024 (via GitHub)" <gi...@apache.org>.
jerry-024 closed pull request #5702: [core] fix: add function name validate
URL: https://github.com/apache/paimon/pull/5702
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] fix: add function name validate [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5702:
URL: https://github.com/apache/paimon/pull/5702#discussion_r2131597772
##########
paimon-api/src/main/java/org/apache/paimon/rest/RESTApi.java:
##########
@@ -851,6 +852,7 @@ public List<String> listFunctions(String databaseName) {
* @throws ForbiddenException if the user lacks permission to access the function
*/
public GetFunctionResponse getFunction(Identifier identifier) {
+ FunctionNameValidator.check(identifier.getObjectName());
Review Comment:
if (!isValidName(name)) {
throw new NoSuchResourceException
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] fix: add function name validate [paimon]
Posted by "jerry-024 (via GitHub)" <gi...@apache.org>.
jerry-024 commented on code in PR #5702:
URL: https://github.com/apache/paimon/pull/5702#discussion_r2131614694
##########
paimon-api/src/main/java/org/apache/paimon/rest/RESTApi.java:
##########
@@ -851,6 +852,7 @@ public List<String> listFunctions(String databaseName) {
* @throws ForbiddenException if the user lacks permission to access the function
*/
public GetFunctionResponse getFunction(Identifier identifier) {
+ FunctionNameValidator.check(identifier.getObjectName());
Review Comment:
If using NoSuchResourceException, this exception is not reasonable when creating a function. So here, IllegalArgumentException may be better. We could give different in function's api in catalog.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org