prompt: 
  We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Rule L060 could give a specific error message
  At the moment rule L060 flags something like this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL' or 'NVL'.
  ```
  
  Since we likely know the wrong word, it might be nice to actually flag that instead of both `IFNULL` and `NVL` - like most of the other rules do.
  
  That is it should flag this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL'.
  ```
   Or this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'NVL'.
  ```
  
  As appropriate.
  
  What do you think @jpy-git ?
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  
  --- BEGIN FILE ---
  ```
  ### src/sqlfluff/rules/L060.py
  """Implementation of Rule L060."""
  
  from typing import Optional
  
  from sqlfluff.core.parser.segments.raw import CodeSegment
  from sqlfluff.core.rules.base import BaseRule, LintFix, LintResult, RuleContext
  from sqlfluff.core.rules.doc_decorators import document_fix_compatible
  
  
  @document_fix_compatible
  class Rule_L060(BaseRule):
      """Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.
  
      | **Anti-pattern**
      | ``IFNULL`` or ``NVL`` are used to fill ``NULL`` values.
  
      .. code-block:: sql
  
          SELECT ifnull(foo, 0) AS bar,
          FROM baz;
  
          SELECT nvl(foo, 0) AS bar,
          FROM baz;
  
      | **Best practice**
      | Use ``COALESCE`` instead.
      | ``COALESCE`` is universally supported,
      | whereas Redshift doesn't support ``IFNULL``
      | and BigQuery doesn't support ``NVL``.
      | Additionally ``COALESCE`` is more flexible
      | and accepts an arbitrary number of arguments.
  
      .. code-block:: sql
  
          SELECT coalesce(foo, 0) AS bar,
          FROM baz;
  
      """
  
      def _eval(self, context: RuleContext) -> Optional[LintResult]:
          """Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``."""
          # We only care about function names.
          if context.segment.name != "function_name_identifier":
              return None
  
          # Only care if the function is ``IFNULL`` or ``NVL``.
          if context.segment.raw_upper not in {"IFNULL", "NVL"}:
              return None
  
          # Create fix to replace ``IFNULL`` or ``NVL`` with ``COALESCE``.
          fix = LintFix.replace(
              context.segment,
              [
                  CodeSegment(
                      raw="COALESCE",
                      name="function_name_identifier",
                      type="function_name_identifier",
                  )
              ],
          )
  
          return LintResult(context.segment, [fix])
  
  ```
  --- END FILE ---
  
  Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.
  
  Every *SEARCH/REPLACE* edit must use this format:
  1. The file path
  2. The start of search block: <<<<<<< SEARCH
  3. A contiguous chunk of lines to search for in the existing source code
  4. The dividing line: =======
  5. The lines to replace into the source code
  6. The end of the replace block: >>>>>>> REPLACE
  
  Here is an example:
  
  ```python
  ### mathweb/flask/app.py
  <<<<<<< SEARCH
  from flask import Flask
  =======
  import math
  from flask import Flask
  >>>>>>> REPLACE
  ```
  
  Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
  Wrap the *SEARCH/REPLACE* edit in blocks ```python...```.
  
instance: {"FAIL_TO_PASS": "[\"test/rules/std_L060_test.py::test__rules__std_L060_raised\"]", "PASS_TO_PASS": "[]", "base_commit": "f1dba0e1dd764ae72d67c3d5e1471cf14d3db030", "created_at": "2022-01-22T12:21:52Z", "environment_setup_commit": "a5c4eae4e3e419fe95460c9afd9cf39a35a470c4", "hints_text": "@tunetheweb Yeah definitely, should be a pretty quick change \ud83d\ude0a", "instance_id": "sqlfluff__sqlfluff-2419", "patch": "diff --git a/src/sqlfluff/rules/L060.py b/src/sqlfluff/rules/L060.py\n--- a/src/sqlfluff/rules/L060.py\n+++ b/src/sqlfluff/rules/L060.py\n@@ -59,4 +59,8 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:\n             ],\n         )\n \n-        return LintResult(context.segment, [fix])\n+        return LintResult(\n+            anchor=context.segment,\n+            fixes=[fix],\n+            description=f\"Use 'COALESCE' instead of '{context.segment.raw_upper}'.\",\n+        )\n", "problem_statement": "Rule L060 could give a specific error message\nAt the moment rule L060 flags something like this:\r\n\r\n```\r\nL:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL' or 'NVL'.\r\n```\r\n\r\nSince we likely know the wrong word, it might be nice to actually flag that instead of both `IFNULL` and `NVL` - like most of the other rules do.\r\n\r\nThat is it should flag this:\r\n\r\n```\r\nL:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL'.\r\n```\r\n Or this:\r\n\r\n```\r\nL:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'NVL'.\r\n```\r\n\r\nAs appropriate.\r\n\r\nWhat do you think @jpy-git ?\r\n\n", "repo": "sqlfluff/sqlfluff", "test_patch": "diff --git a/test/rules/std_L060_test.py b/test/rules/std_L060_test.py\nnew file mode 100644\n--- /dev/null\n+++ b/test/rules/std_L060_test.py\n@@ -0,0 +1,12 @@\n+\"\"\"Tests the python routines within L060.\"\"\"\n+import sqlfluff\n+\n+\n+def test__rules__std_L060_raised() -> None:\n+    \"\"\"L060 is raised for use of ``IFNULL`` or ``NVL``.\"\"\"\n+    sql = \"SELECT\\n\\tIFNULL(NULL, 100),\\n\\tNVL(NULL,100);\"\n+    result = sqlfluff.lint(sql, rules=[\"L060\"])\n+\n+    assert len(result) == 2\n+    assert result[0][\"description\"] == \"Use 'COALESCE' instead of 'IFNULL'.\"\n+    assert result[1][\"description\"] == \"Use 'COALESCE' instead of 'NVL'.\"\n", "version": "0.8"}
parsed_commit_content: {"file_diffs":[{"old_file_content":"\"\"\"Implementation of Rule L060.\"\"\"\n\nfrom typing import Optional\n\nfrom sqlfluff.core.parser.segments.raw import CodeSegment\nfrom sqlfluff.core.rules.base import BaseRule, LintFix, LintResult, RuleContext\nfrom sqlfluff.core.rules.doc_decorators import document_fix_compatible\n\n\n@document_fix_compatible\nclass Rule_L060(BaseRule):\n    \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\n\n    | **Anti-pattern**\n    | ``IFNULL`` or ``NVL`` are used to fill ``NULL`` values.\n\n    .. code-block:: sql\n\n        SELECT ifnull(foo, 0) AS bar,\n        FROM baz;\n\n        SELECT nvl(foo, 0) AS bar,\n        FROM baz;\n\n    | **Best practice**\n    | Use ``COALESCE`` instead.\n    | ``COALESCE`` is universally supported,\n    | whereas Redshift doesn't support ``IFNULL``\n    | and BigQuery doesn't support ``NVL``.\n    | Additionally ``COALESCE`` is more flexible\n    | and accepts an arbitrary number of arguments.\n\n    .. code-block:: sql\n\n        SELECT coalesce(foo, 0) AS bar,\n        FROM baz;\n\n    \"\"\"\n\n    def _eval(self, context: RuleContext) -> Optional[LintResult]:\n        \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\"\"\"\n        # We only care about function names.\n        if context.segment.name != \"function_name_identifier\":\n            return None\n\n        # Only care if the function is ``IFNULL`` or ``NVL``.\n        if context.segment.raw_upper not in {\"IFNULL\", \"NVL\"}:\n            return None\n\n        # Create fix to replace ``IFNULL`` or ``NVL`` with ``COALESCE``.\n        fix = LintFix.replace(\n            context.segment,\n            [\n                CodeSegment(\n                    raw=\"COALESCE\",\n                    name=\"function_name_identifier\",\n                    type=\"function_name_identifier\",\n                )\n            ],\n        )\n\n        return LintResult(context.segment, [fix])\n","new_file_content":"\"\"\"Implementation of Rule L060.\"\"\"\n\nfrom typing import Optional\n\nfrom sqlfluff.core.parser.segments.raw import CodeSegment\nfrom sqlfluff.core.rules.base import BaseRule, LintFix, LintResult, RuleContext\nfrom sqlfluff.core.rules.doc_decorators import document_fix_compatible\n\n\n@document_fix_compatible\nclass Rule_L060(BaseRule):\n    \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\n\n    | **Anti-pattern**\n    | ``IFNULL`` or ``NVL`` are used to fill ``NULL`` values.\n\n    .. code-block:: sql\n\n        SELECT ifnull(foo, 0) AS bar,\n        FROM baz;\n\n        SELECT nvl(foo, 0) AS bar,\n        FROM baz;\n\n    | **Best practice**\n    | Use ``COALESCE`` instead.\n    | ``COALESCE`` is universally supported,\n    | whereas Redshift doesn't support ``IFNULL``\n    | and BigQuery doesn't support ``NVL``.\n    | Additionally ``COALESCE`` is more flexible\n    | and accepts an arbitrary number of arguments.\n\n    .. code-block:: sql\n\n        SELECT coalesce(foo, 0) AS bar,\n        FROM baz;\n\n    \"\"\"\n\n    def _eval(self, context: RuleContext) -> Optional[LintResult]:\n        \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\"\"\"\n        # We only care about function names.\n        if context.segment.name != \"function_name_identifier\":\n            return None\n\n        # Only care if the function is ``IFNULL`` or ``NVL``.\n        if context.segment.raw_upper not in {\"IFNULL\", \"NVL\"}:\n            return None\n\n        # Create fix to replace ``IFNULL`` or ``NVL`` with ``COALESCE``.\n        fix = LintFix.replace(\n            context.segment,\n            [\n                CodeSegment(\n                    raw=\"COALESCE\",\n                    name=\"function_name_identifier\",\n                    type=\"function_name_identifier\",\n                )\n            ],\n        )\n\n        return LintResult(\n            anchor=context.segment,\n            fixes=[fix],\n            description=f\"Use 'COALESCE' instead of '{context.segment.raw_upper}'.\",\n        )\n","header":{"file":{"path":"src/sqlfluff/rules/L060.py"},"misc_line":null},"index_line":null,"is_binary_file":false,"binary_line":null,"minus_file":{"path":"a/src/sqlfluff/rules/L060.py"},"plus_file":{"path":"b/src/sqlfluff/rules/L060.py"},"hunks":[{"descriptor":{"old_range":{"start":59,"length":4},"new_range":{"start":59,"length":8},"section":"def _eval(self, context: RuleContext) -> Optional[LintResult]:"},"line_group":{"all_lines":[{"content":"            ],","type":"context"},{"content":"        )","type":"context"},{"content":"","type":"context"},{"content":"        return LintResult(context.segment, [fix])","type":"deleted"},{"content":"        return LintResult(","type":"added"},{"content":"            anchor=context.segment,","type":"added"},{"content":"            fixes=[fix],","type":"added"},{"content":"            description=f\"Use 'COALESCE' instead of '{context.segment.raw_upper}'.\",","type":"added"},{"content":"        )","type":"added"},{"content":"","type":"context"}]},"modified_entities":[],"added_entities":[],"deleted_entities":[]}]}],"old_commit_hash":"f1dba0e1dd764ae72d67c3d5e1471cf14d3db030","new_commit_hash":"9947e98040ad394b4c273e71d509adcec0e57708","commit_message":"Merge branch 'main' into l060_description","commit_date":"2022-01-22T12:45:20Z","metadata":{}}
problem_statement: Rule L060 could give a specific error message
  At the moment rule L060 flags something like this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL' or 'NVL'.
  ```
  
  Since we likely know the wrong word, it might be nice to actually flag that instead of both `IFNULL` and `NVL` - like most of the other rules do.
  
  That is it should flag this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL'.
  ```
   Or this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'NVL'.
  ```
  
  As appropriate.
  
  What do you think @jpy-git ?
  
  
patch: diff --git a/src/sqlfluff/rules/L060.py b/src/sqlfluff/rules/L060.py
  --- a/src/sqlfluff/rules/L060.py
  +++ b/src/sqlfluff/rules/L060.py
  @@ -59,4 +59,8 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:
               ],
           )
   
  -        return LintResult(context.segment, [fix])
  +        return LintResult(
  +            anchor=context.segment,
  +            fixes=[fix],
  +            description=f"Use 'COALESCE' instead of '{context.segment.raw_upper}'.",
  +        )
   
  
file_context: {"src/sqlfluff/rules/L060.py": "\"\"\"Implementation of Rule L060.\"\"\"\n\nfrom typing import Optional\n\nfrom sqlfluff.core.parser.segments.raw import CodeSegment\nfrom sqlfluff.core.rules.base import BaseRule, LintFix, LintResult, RuleContext\nfrom sqlfluff.core.rules.doc_decorators import document_fix_compatible\n\n\n@document_fix_compatible\nclass Rule_L060(BaseRule):\n    \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\n\n    | **Anti-pattern**\n    | ``IFNULL`` or ``NVL`` are used to fill ``NULL`` values.\n\n    .. code-block:: sql\n\n        SELECT ifnull(foo, 0) AS bar,\n        FROM baz;\n\n        SELECT nvl(foo, 0) AS bar,\n        FROM baz;\n\n    | **Best practice**\n    | Use ``COALESCE`` instead.\n    | ``COALESCE`` is universally supported,\n    | whereas Redshift doesn't support ``IFNULL``\n    | and BigQuery doesn't support ``NVL``.\n    | Additionally ``COALESCE`` is more flexible\n    | and accepts an arbitrary number of arguments.\n\n    .. code-block:: sql\n\n        SELECT coalesce(foo, 0) AS bar,\n        FROM baz;\n\n    \"\"\"\n\n    def _eval(self, context: RuleContext) -> Optional[LintResult]:\n        \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\"\"\"\n        # We only care about function names.\n        if context.segment.name != \"function_name_identifier\":\n            return None\n\n        # Only care if the function is ``IFNULL`` or ``NVL``.\n        if context.segment.raw_upper not in {\"IFNULL\", \"NVL\"}:\n            return None\n\n        # Create fix to replace ``IFNULL`` or ``NVL`` with ``COALESCE``.\n        fix = LintFix.replace(\n            context.segment,\n            [\n                CodeSegment(\n                    raw=\"COALESCE\",\n                    name=\"function_name_identifier\",\n                    type=\"function_name_identifier\",\n                )\n            ],\n        )\n\n        return LintResult(context.segment, [fix])\n"}
filelevel_patches: {"src/sqlfluff/rules/L060.py": "@@ -59,4 +59,8 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:\n             ],\n         )\n \n-        return LintResult(context.segment, [fix])\n+        return LintResult(\n+            anchor=context.segment,\n+            fixes=[fix],\n+            description=f\"Use 'COALESCE' instead of '{context.segment.raw_upper}'.\",\n+        )"}
messages.content: 
  We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Rule L060 could give a specific error message
  At the moment rule L060 flags something like this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL' or 'NVL'.
  ```
  
  Since we likely know the wrong word, it might be nice to actually flag that instead of both `IFNULL` and `NVL` - like most of the other rules do.
  
  That is it should flag this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'IFNULL'.
  ```
   Or this:
  
  ```
  L:  21 | P:   9 | L060 | Use 'COALESCE' instead of 'NVL'.
  ```
  
  As appropriate.
  
  What do you think @jpy-git ?
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  
  --- BEGIN FILE ---
  ```
  ### src/sqlfluff/rules/L060.py
  """Implementation of Rule L060."""
  
  from typing import Optional
  
  from sqlfluff.core.parser.segments.raw import CodeSegment
  from sqlfluff.core.rules.base import BaseRule, LintFix, LintResult, RuleContext
  from sqlfluff.core.rules.doc_decorators import document_fix_compatible
  
  
  @document_fix_compatible
  class Rule_L060(BaseRule):
      """Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.
  
      | **Anti-pattern**
      | ``IFNULL`` or ``NVL`` are used to fill ``NULL`` values.
  
      .. code-block:: sql
  
          SELECT ifnull(foo, 0) AS bar,
          FROM baz;
  
          SELECT nvl(foo, 0) AS bar,
          FROM baz;
  
      | **Best practice**
      | Use ``COALESCE`` instead.
      | ``COALESCE`` is universally supported,
      | whereas Redshift doesn't support ``IFNULL``
      | and BigQuery doesn't support ``NVL``.
      | Additionally ``COALESCE`` is more flexible
      | and accepts an arbitrary number of arguments.
  
      .. code-block:: sql
  
          SELECT coalesce(foo, 0) AS bar,
          FROM baz;
  
      """
  
      def _eval(self, context: RuleContext) -> Optional[LintResult]:
          """Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``."""
          # We only care about function names.
          if context.segment.name != "function_name_identifier":
              return None
  
          # Only care if the function is ``IFNULL`` or ``NVL``.
          if context.segment.raw_upper not in {"IFNULL", "NVL"}:
              return None
  
          # Create fix to replace ``IFNULL`` or ``NVL`` with ``COALESCE``.
          fix = LintFix.replace(
              context.segment,
              [
                  CodeSegment(
                      raw="COALESCE",
                      name="function_name_identifier",
                      type="function_name_identifier",
                  )
              ],
          )
  
          return LintResult(context.segment, [fix])
  
  ```
  --- END FILE ---
  
  Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.
  
  Every *SEARCH/REPLACE* edit must use this format:
  1. The file path
  2. The start of search block: <<<<<<< SEARCH
  3. A contiguous chunk of lines to search for in the existing source code
  4. The dividing line: =======
  5. The lines to replace into the source code
  6. The end of the replace block: >>>>>>> REPLACE
  
  Here is an example:
  
  ```python
  ### mathweb/flask/app.py
  <<<<<<< SEARCH
  from flask import Flask
  =======
  import math
  from flask import Flask
  >>>>>>> REPLACE
  ```
  
  Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
  Wrap the *SEARCH/REPLACE* edit in blocks ```python...```.
  
messages.role: user
verification_info: {"file_context": {"src/sqlfluff/rules/L060.py": "\"\"\"Implementation of Rule L060.\"\"\"\n\nfrom typing import Optional\n\nfrom sqlfluff.core.parser.segments.raw import CodeSegment\nfrom sqlfluff.core.rules.base import BaseRule, LintFix, LintResult, RuleContext\nfrom sqlfluff.core.rules.doc_decorators import document_fix_compatible\n\n\n@document_fix_compatible\nclass Rule_L060(BaseRule):\n    \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\n\n    | **Anti-pattern**\n    | ``IFNULL`` or ``NVL`` are used to fill ``NULL`` values.\n\n    .. code-block:: sql\n\n        SELECT ifnull(foo, 0) AS bar,\n        FROM baz;\n\n        SELECT nvl(foo, 0) AS bar,\n        FROM baz;\n\n    | **Best practice**\n    | Use ``COALESCE`` instead.\n    | ``COALESCE`` is universally supported,\n    | whereas Redshift doesn't support ``IFNULL``\n    | and BigQuery doesn't support ``NVL``.\n    | Additionally ``COALESCE`` is more flexible\n    | and accepts an arbitrary number of arguments.\n\n    .. code-block:: sql\n\n        SELECT coalesce(foo, 0) AS bar,\n        FROM baz;\n\n    \"\"\"\n\n    def _eval(self, context: RuleContext) -> Optional[LintResult]:\n        \"\"\"Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.\"\"\"\n        # We only care about function names.\n        if context.segment.name != \"function_name_identifier\":\n            return None\n\n        # Only care if the function is ``IFNULL`` or ``NVL``.\n        if context.segment.raw_upper not in {\"IFNULL\", \"NVL\"}:\n            return None\n\n        # Create fix to replace ``IFNULL`` or ``NVL`` with ``COALESCE``.\n        fix = LintFix.replace(\n            context.segment,\n            [\n                CodeSegment(\n                    raw=\"COALESCE\",\n                    name=\"function_name_identifier\",\n                    type=\"function_name_identifier\",\n                )\n            ],\n        )\n\n        return LintResult(context.segment, [fix])\n"}, "filelevel_patches": {"src/sqlfluff/rules/L060.py": "@@ -59,4 +59,8 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:\n             ],\n         )\n \n-        return LintResult(context.segment, [fix])\n+        return LintResult(\n+            anchor=context.segment,\n+            fixes=[fix],\n+            description=f\"Use 'COALESCE' instead of '{context.segment.raw_upper}'.\",\n+        )"}}