Skip to content

Conversation

fstg1992
Copy link
Contributor

Brief summary of the change made

fixes #6452
minor changes to the FunctionNameSegment Class.
new test.

Are there any other side effects of this change that we should be aware of?

May affect parsing of Quoted Function Identifiers, as this has been removed from the Class - in Databricks at least this not parsable anyways.

Pull Request checklist

  • Please confirm you have completed any of the necessary steps below.

  • Included test cases to demonstrate any code changes, which may be one or more of the following:

    • .yml rule test cases in test/fixtures/rules/std_rule_cases.
    • .sql/.yml parser test cases in test/fixtures/dialects (note YML files can be auto generated with tox -e generate-fixture-yml).
    • Full autofix test cases in test/fixtures/linter/autofix.
    • Other.
  • Added appropriate documentation for the change.

  • Created GitHub issues for any relevant followup/future enhancements if appropriate.

@fstg1992 fstg1992 marked this pull request as ready for review November 12, 2024 17:09
Copy link
Contributor

github-actions bot commented Nov 12, 2024

Coverage Results ✅

Name    Stmts   Miss  Cover   Missing
-------------------------------------
TOTAL   18773      0   100%

243 files skipped due to complete coverage.

@WittierDinosaur
Copy link
Contributor

I think what we actually want to do here is change the FunctionNameIdentifierSegment for databricks. The db, schema, would parse properly with SingleIdentifierGrammar. The issue with this implementation is we lose the function_name_identifier part of the parse tree, which could affect rules

@fstg1992
Copy link
Contributor Author

fstg1992 commented Nov 13, 2024

@WittierDinosaur - fair point. Pushed a new change with the proposed amendment.
I did keep the change to the FunctionNameSegment tho, as the FunctionNameSegment inherited from Ansi includes an invalid format option (QuotedIdentifierSegment)

Inclusion of the Backtick in the FunctionNameIdentifierSegment should yield the same parse-trees.

@fstg1992
Copy link
Contributor Author

resolved conflicts.

Copy link
Contributor

@WittierDinosaur WittierDinosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@WittierDinosaur WittierDinosaur added this pull request to the merge queue Nov 16, 2024
Merged via the queue into sqlfluff:main with commit 50a1c4b Nov 16, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Databricks Dialect: Backticked name idenfitifer unparsable for CREATE FUNCTION
2 participants