vogievetsky commented on a change in pull request #10496:
URL: https://github.com/apache/druid/pull/10496#discussion_r502554718



##########
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:
       yeah it is pretty blunt, just replaces all the `==` with `=`... Maybe it 
should be aware of the line markers in the error text




----------------------------------------------------------------
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]

Reply via email to