=~ with (?x) and a pattern that ends in a # comment fails on Postgres and SQLite, and is false on Oracle
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 57/100
Línea de trabajo
Read the Cypher compilation path that wraps =~ patterns and handles flags, then check the database-specific behavior described for Postgres, SQLite, and Oracle. Reproduce the supplied (?x) example and add the stated spec case to liberation-data/drivine-cypher-spec. Done means the case returns true across the affected stores, including Oracle's handling of # comments.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
In compiled Cypher, =~ wraps the pattern in a group of its own and appends the closing parenthesis and the end anchor on the same line: \A( … )\Z on Postgres, \A( … )\z on Oracle, ^(?: … )\z on SQLite. Under (?x), a # starts a comment that runs to the end of the line, so a pattern that ends in a comment comments out what was appended:
RETURN 'ab' =~ '(?x)ab # c'
| Store | Gives |
|---|---|
Neo4j (Java's matches()) |
true |
| Postgres | error: invalid regular expression: parentheses () not balanced |
| SQLite | error: Unclosed group (Java's PatternSyntaxException) |
| Oracle | false: its x ignores whitespace but takes # literally |
'(?x)a b' (no comment) already gives true on Postgres and Oracle.
A fix would put a line break before what is appended when the flags hold x, which ends the comment and, under x, is otherwise ignored. Oracle would also need its # comments taken out, as its x doesn't read them. A spec case ('ab' =~ '(?x)ab # c' is true) should go into liberation-data/drivine-cypher-spec with the fix.
Checked directly on Postgres 17, Oracle Free 23 and Java 25.
- Lenguaje dominante
- Python
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 1 h 13 min
- PR fusionados (30 d)
- 109
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de liberation-data/drivine-python
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
liberation-data/drivine-python#209 ·
Los mantenedores suelen responder en 1 día
-
CI: three Oracle-only tests in test_cypher_compiled.py never run, as -k oracle doesn't select themAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
liberation-data/drivine-python#178 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
liberation-data/drivine-python#219 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
liberation-data/drivine-python#218 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
liberation-data/drivine-python#215 ·
Los mantenedores suelen responder en 1 día
Todos los issues de liberation-data/drivine-python
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
glossyio/traffic-monitor#264 ·
Los mantenedores suelen responder en 1 día
-
Add self-hostAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Atarity/deploy-your-own-saas#102 ·
-
[Bug]: RDFlex silently drops the covariate adjustment when the outcome or treatment column is integer-typedPosiblemente ocupada @vrjdev la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
DoubleML/doubleml-for-py#424 ·
Los mantenedores suelen responder en 1 día
-
agentic-dmx docs enhancement
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
521xueweihan/HelloGitHub#4150 ·