Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Parsing Semi-Colons when embedded in a string #544

Closed
5 of 13 tasks
dm-duys opened this issue May 3, 2024 · 1 comment
Closed
5 of 13 tasks

Issue Parsing Semi-Colons when embedded in a string #544

dm-duys opened this issue May 3, 2024 · 1 comment

Comments

@dm-duys
Copy link

dm-duys commented May 3, 2024

Before Proceeding, please acknowledge:

  • I have consulted the Troubleshooting guide.
  • I have searched Issues and Discussions in this repo.
  • Feature requests should be initiated as Discussions. This is a bug report.

Describe the bug
If you embed a ; as part of a string, Harlequin will see the content before it as a statement and attempt to execute.

To Reproduce
Steps to reproduce the behavior.

  1. Load up Azure Extension
    INSTALL azure; LOAD azure;

  2. Attempt to create a secret.

CREATE PERSISTENT SECRET secret_sas_token(
   TYPE AZURE,
   CONNECTION_STRING 'BlobEndpoint=https://my.url.com;SharedAccessSignature=sv=....'
);

Expected behavior
When parsing, it should exclude semi-colons if they are wrapped within a string literal

Actual behavior
It seems to be parsing the content left of the content of any semi-colon. From above, it tries to execute:

CREATE PERSISTENT SECRET secret_sas_token(
   TYPE AZURE,
   CONNECTION_STRING 'BlobEndpoint=https://my.url.com

Contributing
Are you interested in contributing a fix?

  • Yes
  • Maybe
  • No

Additional context
Please provide as much as you can, but don't waste your time if it's definitely not relevant or you don't know.

What is the output of harlequin --version?
1.20.0

What database adapter are you using with Harlequin? (Default is duckdb)
duckdb: 1.20.0

What other options are you using when invoking Harlequin? (If you are using a profile, please add relevant items from your profile here).

Can you tell us more about your system?

  • Shell: bash 5.1.16
  • Terminal: gnome
  • OS of the shell: Ubuntu 22.04.4 LTX x86_64
  • OS of the terminal (if different from the shell):
  • Default locale / language for your OS/Terminal/Shell:

Tip

For example, for my system, these are:

  • Bash
  • Windows Terminal
  • Ubuntu 22.04 / WSL2
  • Windows 11
  • en_US/UTF-8

How did you install Harlequin?

  • pipx
  • conda/mamba
  • pip (global install)
  • pip + venv/virtualenv or pipenv
  • Poetry
  • uv/Rye
  • other: _____________
@tconbeer
Copy link
Owner

tconbeer commented May 3, 2024

Yes, this is unfortunate. Duplicates #348

@tconbeer tconbeer closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
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

No branches or pull requests

2 participants