[coverage] Conformance findings: PARAMQUERY-019,PARAMQUERY-021

Đang mở
#502 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, sql, typescript
Lĩnh vực
backend, database

Hướng nghiên cứu

Bắt đầu với hai bài kiểm thử conformance bị lỗi được nêu tên trong diff tests/ của coverage PR, sau đó so sánh hành vi mong đợi của chúng với reference PR #167. Truy vết đường dẫn liên kết tham số Thrift của TypeScript driver đối với các giá trị DECIMAL; hoàn tất khi cả hai xfail test PARAMQUERY-019 và PARAMQUERY-021 đều chuyển sang green mà không bị cắt ngắn phần giá trị thập phân.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-nodejs. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-nodejs) is fixed, then flips green as a tripwire.

Findings

  • PARAMQUERY-019 [thrift]: Thrift DECIMAL target case of the coercion table truncates the bound value ("123.45" -> 123) — same bind-side scale loss as PARAMQUERY-021; all other declared targets (INTEGER/BIGINT/DOUBLE/STRING/DATE/TIMESTAMP) conform
    • failing test: target-type coercion — the declared target type, not the source string, drives the result column type [thrift] (see the coverage PR diff under tests/)
  • PARAMQUERY-021 [thrift]: Thrift bind of a DECIMAL-typed DBSQLParameter with a scale-less target silently truncates fractional digits ("123.45" returns 123, "123.4567" returns 123) — silent numeric data loss with no error; SEA preserves the value correctly
    • failing test: under-specified DECIMAL target — fractional digits survive, never silently truncated [thrift] (see the coverage PR diff under tests/)

Reproduce & Expected

PARAMQUERY-019 — Verify setObject() coerces string "123" to integer

Reproduce:

SELECT ? AS int_value
SELECT ? AS v
PARAMQUERY-021 — Verify that declaring a DECIMAL/NUMERIC target type WITHOUT a scale never causes the driver to silently drop the fractional digits of the bound value.

Reproduce:

SELECT ? AS decimal_value
SELECT ? AS decimal_value

Context

Ngôn ngữ chính
TypeScript
Star
36
Fork
50
Merge trung bình
13 giờ 46 phút
Pull request đã merge (30 ngày)
9

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của databricks/databricks-sql-nodejs

Tất cả issue của databricks/databricks-sql-nodejs

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.