Skip to content

[BUG]: When comments contain one single quote converter considers some static strings to be inside another . #2183

@PaataTa

Description

@PaataTa

Is there an existing issue for this?

  • I have searched the existing issues

Category of Bug / Issue

Converter bug

Current Behavior

Two Single quotes are getting converted to one double quote. This should only happen when 2 single quotes are within static string.
The cause of this is one single quote within comment so converter considers 2 single quote being within a static string.

Expected Behavior

  1. The fix for this is: hide comments before capturing all nested static strings.

Steps To Reproduce

To reproduce convert below file with mssql dialect.
dbo.usp_LTV_Prep.StoredProcedure.sql

Relevant log output or Exception details

Logs Confirmation

  • I ran the command line with --debug
  • I have attached the lsp-server.log under USER_HOME/.databricks/labs/remorph-transpilers/<converter_name>/lib/lsp-server.log

Sample Query

Operating System

macOS

Version

latest via Databricks CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions