Find a search text past 32 KB with CONTAINS on Oracle, where it raises ORA-22828
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 0
- Merge trung bình
- 1 giờ 21 phút
- Pull request đã merge (30 ngày)
- 128
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của liberation-data/drivine-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
liberation-data/drivine-python#250 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
liberation-data/drivine-python#209 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CI: three Oracle-only tests in test_cypher_compiled.py never run, as -k oracle doesn't select themĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
liberation-data/drivine-python#178 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Read a list item past 32 KB by its place on Oracle without crashing the session over two rowsĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
liberation-data/drivine-python#279 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
liberation-data/drivine-python#277 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của liberation-data/drivine-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Validate finite output clamping limits in StepPredictor.prepare_clamping_params to prevent silent NaN/Inf propagationCó thể đã có người làm @muskan-creates352 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
mllam/neural-lam#848 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
infra
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
fab-geocommuns/RNB-coeur#1166 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepspeedai/DeepSpeed#8951 ·
Maintainer thường phản hồi trong vòng 2 ngày