Bulk Copy Handles Decimal Inconsistently Compared with Normal Queries
メンテナーはふだん 2 日以内に返信
@Theekshna がすでに取り組んでいます。
2026年3月2日 から。
評価
この issue はまだ評価されていません。
説明
Describe the bug
Trying to insert into a Decimal column with the new bulk_copy can throw an exception regarding mismatched decimal scale, whereas a normal insert will succeed and automatically deal with the issue. I would like to see bulk_copy work similarly and seamlessly.
To reproduce
import mssql_python
from decimal import Decimal
conn = mssql_python.connect([conn string], autocommit=True)
cur = conn.cursor()
cur.execute('create table dectest (d decimal(10, 2));')
# This next line works fine
cur.execute('insert into dectest values (?)', Decimal('123.456'))
# This line fails with the below exception
cur.bulkcopy('dectest', (Decimal('123.456'),))
Exception message
ValueError: Input decimal scale 3 exceeds target scale 2
Expected behavior
The bulkcopy should succeed and the value should be automatically rounded as it is in the insert.
- 主要言語
- Python
- スター
- 478
- フォーク
- 62
- 平均マージ
- 3日 19分
- マージ済み PR(30日)
- 28
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/mssql-python のほかの issue
-
area: bulk-copy triage needed
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/mssql-python#843 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
triage needed
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoft/mssql-python#846 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
macOS: encrypted connections fail after Homebrew moved the `openssl` alias to `openssl@4`対応中かも @bewithgaurav が 15 日前に担当しました。 オープンarea: packaging-platform bug triage needed
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
microsoft/mssql-python#826 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Announcement: mssql-python is coming to Django through mssql-django 2.0再び着手できるかも @bewithgaurav が 42 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンannouncement
microsoft/mssql-python#748 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Connection pool can briefly exceed max_size when pooling is disabled under load対応中かも @bewithgaurav が 24 日前に担当しました。 オープンarea: connectivity-auth bug triage done under development
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
microsoft/mssql-python#746 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
microsoft/mssql-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
aws-samples/sample-per-model-bedrock#243 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
FuRongJun-1999/dsh-memory#404 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
PennyLaneAI/catalyst#3337 ·
メンテナーはふだん 1 日以内に返信
-
Workflow.schedule stops when a cron deadline passes before sleep対応中かも @HuaTNA が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信