Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

=~ with (?x) and a pattern that ends in a # comment fails on Postgres and SQLite, and is false on Oracle

Abierto
#115 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
postgresql, python, sqlite
Área
databases

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de liberation-data/drivine-python

Todos los issues de liberation-data/drivine-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.