apache / apache/datafusion-sqlparser-rs
IDENTIFIER literal with double quotes inside single quotes is parsed as one token instead of multiple identifiers
- Linguagem predominante
- Rust
- Estrelas
- 3.5k
- Forks
- 772
- Merge médio
- 4d 9h
- PRs com merge (30d)
- 17
Descrição
When running the following statement:
CREATE TABLE IDENTIFIER('"ORGDATA"."PUBLIC"."car_sales"')
the parser produces:
SingleQuotedString("\"ORGDATA\".\"PUBLIC\".\"car_sales\"")
It is treated as a single token (a literal string) instead of being parsed into three separate identifiers ("ORGDATA", "PUBLIC", "car_sales").
Since the IDENTIFIER function expects a literal, the content must be re-parsed.
**Suggestions:**
1. Expose a function that can take a SingleQuotedString like: '"ORGDATA"."PUBLIC"."car_sales"' and re-parse it into separate Ident tokens (ORGDATA, PUBLIC, car_sales).
2. change the tokenizer so that when IDENTIFIER is used with a quoted string containing double quotes, the inner content is tokenized as identifiers rather than treated as a raw single string.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Comece rastreando como o parser lida com CREATE TABLE IDENTIFIER(...) e como os valores de SingleQuotedString chegam à função IDENTIFIER ou ao tokenizer. Reproduza o exemplo e determine se o resultado pretendido são três identificadores entre aspas; considera-se concluído quando a entrada não é mais tratada como um único literal e o comportamento de parsing existente permanece intacto.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- rust
- Domínio
- compilers
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100