PostgreSQL: populate(reserve_jobs=True) fails below a native time key
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 86/100
Hướng nghiên cứu
Start with the reproduction in jobs.py, where primary-key attributes are copied into the jobs table definition, then inspect PostgreSQL type reporting in declare.py around match_type. Run the reproduction to confirm that Done.populate(reserve_jobs=True) fails while plain populate() succeeds. Done means PostgreSQL time and affected timestamp type names can be declared again and reservation succeeds without regressing MySQL.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug
On PostgreSQL, populate(reserve_jobs=True) fails for a table whose primary key includes a native time attribute inherited from a parent:
DataJointError: Unsupported attribute type time without time zone
Reproduction
@schema
class Shift(dj.Manual):
definition = """
start_time : time
"""
@schema
class Done(dj.Computed):
definition = """
-> Shift
"""
def make(self, key):
self.insert1(key)
Shift.insert1({"start_time": "01:02:03"})
Done.populate(reserve_jobs=True) # raises on PostgreSQL; works on MySQL
Plain populate() works on both backends.
Cause
The jobs table copies each primary-key attribute's type into its definition (jobs.py, attr.original_type or attr.type). For a native attribute, that type comes from the server: PostgreSQL reports time without time zone, which the declaration parser does not accept (declare.py, match_type).
Fix
Normalize these names when PostgreSQL column information is read (time, time(p), timestamp, timestamp(p), using datetime_precision), so the heading's type can be declared again. timestamp attributes are likely affected the same way (timestamp without time zone); this was not checked.
- Ngôn ngữ chính
- Python
- Star
- 198
- Fork
- 107
- Merge trung bình
- 4 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 datajoint/datajoint-python
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
datajoint/datajoint-python#1775 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
MySQL: with use_tls=False, 2.3.6 needs the cryptography package to log in to MySQL 8Có thể đã có người làm @dimitri-yatsenko đã nhận 5 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
datajoint/datajoint-python#1750 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
datajoint/datajoint-python#1747 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Reject constant defaults on primary-key attributesCó thể đã có người làm @godara-alt đã nhận 4 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
datajoint/datajoint-python#1712 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Decoding a <blob> value in an unknown format returns None instead of raising an errorCó thể đã có người làm @godara-alt đã nhận 9 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
datajoint/datajoint-python#1703 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của datajoint/datajoint-python
Issue tương tự
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)Có thể đã có người làm @gouyu-hou đã nhận hôm nay. Đang mởtriage/confirmed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
agentscope-ai/agentscope#4397 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area/profiles area/sessions comp/desktop desktop/chat desktop/sessions P2 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#161712 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[New Check]: postgresql_flexible_server_public_network_access_disabledCó thể đã có người làm @pouria-l đã nhận hôm nay. Đang mởfeature-request status/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
prowler-cloud/prowler#13615 · 1 bình luận ·
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
SACGF/variantgrid#2941 ·
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 82/100
linkedin/Liger-Kernel#1730 ·
Maintainer thường phản hồi trong vòng 3 ngày