Find a search text past 32 KB with CONTAINS on Oracle, where it raises ORA-22828
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start at drivine/cypher/sql/oracle_cypher_compiler.py:890 in contains_text, then inspect the ported drivine4j fix and the Oracle-specific tests. Implement the CLOB handling described in the issue, including its long-search path and Oracle 23 workaround. Port the listed cross-engine cases and SQL pins; done means long search texts return the expected results across parameters, stored properties, writes, grouping and WHERE/reduce use.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Port of liberation-data/drivine4j#312 (fix: liberation-data/drivine4j#441).
What happens now. On Oracle, once either side of CONTAINS is longer than 4,000 bytes, both sides are read as CLOBs and checked with INSTR(t, x) > 0. INSTR refuses a search text longer than 32,767 UTF-16 units and raises ORA-22828. The limit counts units, not bytes. So t CONTAINS x with x past 32 KB fails instead of answering.
The code is at drivine/cypher/sql/oracle_cypher_compiler.py:890 (contains_text) on origin/main.
What the drivine4j fix does. The VARCHAR2 arm is unchanged. The CLOB arm binds both CLOBs with bound(), inside a NO_MERGE view (the rule from #370), and then:
- if either side is null, the answer is null;
- if the search text is at most 32,767 units, it uses
SIGN(INSTR(t, x)); - if the search text is at least as long as the text, it uses
DBMS_LOB.COMPAREfor equality; - otherwise it runs a
MODEL … RULES ITERATEloop. The loop finds each place where the search's first 1,000 units occur, and confirms the whole search there withDBMS_LOB.COMPARE(t, x, LENGTH(x), at, 1).
The CASE gives a number, and that number is compared with 1 outside the subquery. This works around an Oracle 23 defect: compared inside, the MODEL subquery gives FALSE where alone it gives 1. The drivine4j constants are SEARCHED_TEXT (32,767), SEARCHED_PREFIX (1,000) and SEARCHED_PLACES.
Tests to port (CypherQueryCrossEngineTest in drivine4j):
-
"CONTAINS finds a text past 32 KB in a text of any length…". Its cases:
- 32,767 and 32,768 units, found and not found;
- long in longer;
- equal texts;
- a search longer than the text;
- a search whose first 1,000 units occur nowhere;
''and null on either side;- three-byte characters;
- surrogate pairs across the 1,000th and 32,767th unit.
Each case runs as parameters, as stored properties and in a write, three times on one session.
-
The aggregate/grouping-key test and the WHERE/reduce() test.
-
The SQL pins in
OracleContainsTextTest.
- Lenguaje dominante
- Python
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 1 h 21 min
- PR fusionados (30 d)
- 128
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
liberation-data/drivine-python#250 ·
Los mantenedores suelen responder en 1 día
-
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
-
Read a list item past 32 KB by its place on Oracle without crashing the session over two rowsAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
liberation-data/drivine-python#279 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
liberation-data/drivine-python#277 ·
Los mantenedores suelen responder en 1 día
Todos los issues de liberation-data/drivine-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
-
Validate finite output clamping limits in StepPredictor.prepare_clamping_params to prevent silent NaN/Inf propagationPosiblemente ocupada @muskan-creates352 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
mllam/neural-lam#848 ·
Los mantenedores suelen responder en 2 días
-
infra
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
fab-geocommuns/RNB-coeur#1166 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
deepspeedai/DeepSpeed#8951 ·
Los mantenedores suelen responder en 2 días