Skip to content

[Feature](function) Support function DAMERAU_LEVENSHTEIN_DISTANCE#65278

Open
linrrzqqq wants to merge 1 commit into
apache:masterfrom
linrrzqqq:support-damerau-levenshtein-distance
Open

[Feature](function) Support function DAMERAU_LEVENSHTEIN_DISTANCE#65278
linrrzqqq wants to merge 1 commit into
apache:masterfrom
linrrzqqq:support-damerau-levenshtein-distance

Conversation

@linrrzqqq

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@linrrzqqq linrrzqqq force-pushed the support-damerau-levenshtein-distance branch from 738ef39 to e875c26 Compare July 6, 2026 13:31
@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review completed for PR #65278.

I found no blocking correctness issues and no inline comments to submit.

Critical checkpoint conclusions:

  • Goal and tests: The PR adds damerau_levenshtein_distance plus levenshtein_distance / edit_distance aliases. FE binding, FE constant folding, BE execution, and regression coverage are present for literal, vector/vector, vector/scalar, NULL, UTF-8, transposition, and oversized matrix cases.
  • Scope: The function changes are focused on the string-distance implementation, FE scalar registration, executable folding, benchmark coverage, and one regression suite.
  • Concurrency, lifecycle, persistence, and configuration: Not applicable; this is a deterministic scalar function addition with no new shared state, config, persistence, RPC, or lifecycle path.
  • FE/BE compatibility: FE and BE expose matching names and return INT; aliases map consistently, and the FE/BE Damerau implementations use the same full recurrence and 16M-cell guard.
  • Parallel paths: Runtime BE execution and FE constant folding were checked. The scalar follows the existing Levenshtein nullable/signature pattern and does not require optimizer, join, aggregate, or property-derivation changes.
  • Test result review: The added .out rows match an independent full Damerau-Levenshtein calculation for the covered cases. Patch whitespace/reverse-apply hygiene passed.
  • Validation limits: I did not run FE/BE builds or regression tests because this checkout lacks thirdparty/installed/bin/protoc.

User focus: No additional user-provided review focus was supplied.

Subagent conclusions:

  • optimizer-rewrite: no optimizer/rewrite candidate findings; convergence round 1 returned NO_NEW_VALUABLE_FINDINGS.
  • tests-session-config: no tests/session/config candidate findings; convergence round 1 returned NO_NEW_VALUABLE_FINDINGS.
  • No candidates were accepted, dismissed as duplicates, or submitted as inline comments.

@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 3.70% (2/54) 🎉
Increment coverage report
Complete coverage report

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.

2 participants