apache / apache/datafusion-sqlparser-rs
IDENTIFIER literal with double quotes inside single quotes is parsed as one token instead of multiple identifiers
- Lenguaje dominante
- Rust
- Estrellas
- 3.5k
- Forks
- 772
- Merge medio
- 4 d 9 h
- PR fusionados (30 d)
- 17
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza rastreando cómo el parser gestiona CREATE TABLE IDENTIFIER(...) y cómo los valores de SingleQuotedString llegan a la función IDENTIFIER o al tokenizer. Reproduce el ejemplo y determina si el resultado esperado son tres identificadores entre comillas; se considera terminado cuando la entrada ya no se trata como un único literal y el comportamiento de parsing existente permanece intacto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- compilers
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100