suneet-s commented on a change in pull request #10496:
URL: https://github.com/apache/druid/pull/10496#discussion_r502163499
##########
File path: web-console/src/utils/druid-query.ts
##########
@@ -92,12 +97,55 @@ export class DruidError extends Error {
return;
}
+ static getSuggestion(errorMessage: string): QuerySuggestion | undefined {
+ // == is used instead of =
+ if (errorMessage.includes('Encountered "= =" at')) {
+ return {
+ label: `Replace == with =`,
+ fn: str => {
+ if (!str.includes('==')) return;
+ return str.replace(/==/g, '=');
Review comment:
what if `==` is part of a literal? Does `str#replace` replace all
instances of the regex in the string?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]