Skip to content

Parser error when table name contains hyphens (-) #1

@siddiqskm

Description

@siddiqskm

Description
I encountered a parser error when querying a table whose name contains hyphens (-), such as:

messages_06fd576c-e4b2-4450-b493-ebdaa9c2b7a5

Steps to Reproduce

  • Create or use a table with a name containing hyphens, for example:
    messages_06fd576c-e4b2-4450-b493-ebdaa9c2b7a5
  • Run a query using lsql:
    lsql sql .cog/lancedb-data "SELECT * FROM summaries"
  • Error observed is as follows -
➜  cog git:(main) lsql sql .cog/lancedb-data "SELECT * FROM summaries"
Error: Parser Error: syntax error at or near "-"

LINE 1: CREATE TEMP VIEW messages_06fd576c-e4b2-4450-b493-ebdaa9c2b7a5 AS SELECT * FROM arrow_table

Environment

  • OS: macOS
  • Tool: lsql
  • Database: LanceDB
  • Version: 0.1.1

I’d be happy to contribute a fix for this. Please let me know if there are any preferred conventions or areas of the codebase I should follow, and I can submit a PR - Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions