Oracle: a coalesce of a list of temporal values, or a list of lists or maps of them, still reads through JSON_TABLE and stalls the parse (port of drivine4j#347)
Les mainteneurs répondent en général sous 1 jour
Une pull request liée a déjà été fusionnée.
- #222 par @jasperblues — fusionnée
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
Piste de recherche
Start in drivine/cypher/sql/sql_cypher_compiler.py, especially _holds_temporals, coalesce, and the list-kind tracking around the cited lines. Read the ported drivine4j fix and inspect the named Oracle tests and CypherQueryContract for expected SQL and behavior. Done when temporal lists of the described shapes avoid JSON_TABLE, non-temporal lists still use it, and the guarded Oracle runs complete within 10 seconds.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Port of liberation-data/drivine4j#347.
Once #217 (the port of drivine4j#331) merges, Oracle reads a list by its places only where the compiler knows its items, or their items, are temporal values (_holds_temporals, drivine/cypher/sql/sql_cypher_compiler.py:5640 on oracle-parse-hang). It loses track in two places, and those lists still go to JSON_TABLE, whose parse over a list worked out with temporal arithmetic stalls the session:
coalesce(l, []):coalesce(sql_cypher_compiler.py:4579) builds its result with onlytemporal, notitems/item_items.- Three levels deep, or maps:
item_itemstracks kinds two levels down, socollect(DISTINCT [l, l]),collect(DISTINCT [x IN l | [x]]),collect(DISTINCT [x IN l | {t: x}])andUNWIND [x IN l | {t: x}] AS mgo toJSON_TABLE.
On Oracle 23.26, drivine4j measured 42 s for the coalesce, 43–106 s for the three-level lists, 105 s and over 120 s for the lists of maps. The results are right; only the parse is slow.
The fix in drivine4j (liberation-data/drivine4j#353): a compiled JSON value carries temporals, which says it holds a temporal value the statement makes at any depth. It is set by list and map literals, map projections, comprehensions, collect, CASE, coalesce, + and UNION. It is passed on by items, slices, map properties, WITH, reverse, tail, head, last, min and max. _holds_temporals also checks it, so Oracle reads such a list by its places. coalesce now also gives the items/item_items its arguments agree on, ignoring a written null or empty list (listKindOf in drivine4j). _item_kind_of ignores a written empty list too. Lists of other values keep JSON_TABLE, and Postgres and SQLite compile to the same SQL.
Tests to port:
OracleZonedListSortTest: SQL-shape checks for thecoalesce, deep and map statements, and for non-temporal lists that keepJSON_TABLE.OracleZonedListSortRunTest: the same statements run under its 10 s kill-and-abort guard.CypherQueryContract: "a coalesce of a list of temporal values worked out on each row, and lists or maps that hold such a list deeper, read item by item".
- Langage dominant
- Python
- Étoiles
- 1
- Forks
- 0
- Merge moyen
- 1 h 28 min
- PR mergées (30 j)
- 144
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de liberation-data/drivine-python
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
liberation-data/drivine-python#250 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
liberation-data/drivine-python#209 ·
Les mainteneurs répondent en général sous 1 jour
-
CI: three Oracle-only tests in test_cypher_compiled.py never run, as -k oracle doesn't select themOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
liberation-data/drivine-python#178 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 56/100
liberation-data/drivine-python#321 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
liberation-data/drivine-python#316 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de liberation-data/drivine-python
Issues similaires
-
PluginProvider.storeInstance races and clobbers the dedup cache for concurrent loadsPeut-être pris @Wilson0511 l’a pris aujourd’hui. Ouverteneeds-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 2 jours
-
community documentation good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bug(sdk): add_toleration_json silently drops camelCase tolerationSeconds for static dict/list inputPeut-être pris @ravikumar266 l’a pris aujourd’hui. Ouvertearea/sdk kind/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
kubeflow/pipelines#15347 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
predict_file with crop_model duplicates predictions once per imagePeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
weecology/DeepForest#1445 ·