-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[CALCITE-3604] Fixing locale error message in ExtractValue Function #1666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -35,6 +37,10 @@ | |||
*/ | |||
public class SqlXmlFunctionsTest { | |||
|
|||
@BeforeAll public static void setUp() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could not find a better way to fix the test case. Explored LocaleEnUs but no luck
Changing the Locale can't fix the issue. |
ExInst<CalciteException> illegalBehaviorInExtractValueFunc(String errorBehavior, String value, | ||
String xpath); | ||
@BaseMessage("Illegal behavior in EXTRACTVALUE: xml: ''{0}'', xpath expression: ''{1}''") | ||
ExInst<CalciteException> illegalBehaviorInExtractValueFunc(String xml, String xpath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the exception content is not demonstrated, "Illegal behavior" may be confusing to end-uses.
Can we keep the message style same as that of Json function, i.e., "Invalid input for ..."? E.g.,
@BaseMessage("Invalid input for JSON_REMOVE: document: ''{0}'', jsonpath expressions: ''{1}''")
ExInst<CalciteException> invalidInputForJsonRemove(String value, String pathSpecs);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have verified this change in my environment, it works well. Thanks!
LGTM |
* Removing exception from xml function's error messages; * Renaming exception method to invalid input for ExtractValue. close apache#1666
No description provided.