CeilTemporal moves values already on a Year/Quarter/Month boundary to the next period
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
調査の方向性
arrow/compute/internal/kernels/rounding.goを読み、roundTimestampCalendarに注目してください。Year、Quarter、MonthのRoundUp分岐をDay分岐と比較してください。すでに暦上の境界にある値について、再現例に基づく回帰テストを追加し、該当する丸めテストを実行してください。完了条件は、デフォルトオプションで境界に揃ったYear、Quarter、Monthのタイムスタンプが保持され、既存の切り上げ動作も引き続きテストに合格することです。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug, including details regarding any error messages, version, and platform.
CeilTemporal with unit Year, Quarter or Month moves a value that is already on a period boundary to the next period. This happens with the default options (CeilIsStrictlyGreater: false). v18.8.0 returns the input unchanged. Day is not affected.
Version: v18.9.0. Regressed in 6542b630f84dda25715f6238027cc1eed9d114c6 (#1127).
Repro:
func TestCeilAlignedCalendar(t *testing.T) {
mem := memory.NewGoAllocator()
in, _, err := array.FromJSON(mem, &arrow.TimestampType{Unit: arrow.Second},
strings.NewReader(`["1970-01-01T00:00:00", "2021-01-01T00:00:00"]`))
if err != nil {
t.Fatal(err)
}
defer in.Release()
for _, unit := range []compute.RoundTemporalUnit{compute.RoundTemporalYear, compute.RoundTemporalQuarter, compute.RoundTemporalMonth, compute.RoundTemporalDay} {
res, err := compute.CeilTemporal(context.Background(), compute.RoundTemporalOptions{Multiple: 1, Unit: unit}, compute.NewDatum(in))
if err != nil {
t.Fatal(err)
}
out := res.(*compute.ArrayDatum).MakeArray()
if !array.Equal(in, out) {
t.Errorf("unit=%d: in=%v out=%v", unit, in, out)
}
out.Release()
res.Release()
}
}
Output on v18.9.0 (unit 0 = Year, 1 = Quarter, 2 = Month):
--- FAIL: TestCeilAlignedCalendar (0.00s)
unit=0: in=[0 1609459200] out=[31536000 1640995200]
unit=1: in=[0 1609459200] out=[7776000 1617235200]
unit=2: in=[0 1609459200] out=[2678400 1612137600]
The test passes on the parent of 6542b63 (72e9a56).
Cause: in arrow/compute/internal/kernels/rounding.go, roundTimestampCalendar, the RoundUp branches for Year, Quarter and Month always add multiple. Before #1127 they had the guard if opts.CeilIsStrictlyGreater || !t.Equal(periodStart). The Day branch still has it.
Component(s)
Go
beep boop, a clanker found this and wrote it up 🤖
- 主要言語
- Assembly
- スター
- 423
- フォーク
- 188
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 164
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/arrow-go のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
arrow/compute: safe float to integer cast skips the truncation check in sliced arrays with nulls対応中かも @mansur-akhmadi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 1/100
メンテナーはふだん 1 日以内に返信
-
Type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
parquet/file: a panic recovered in WriteBatch is not kept, so Close writes a footer for rows with no values対応中かも @EdwardShen125 が 4 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
ipc: stream reader accepts an invalid flatbuffer schema and decimal precision 0対応中かも @AynSiddiqui が 7 日前に担当しました。 オープン
apache/arrow-go#1676 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
apache/arrow-go の issue をすべて見る
似ている issue
-
Fish Audio Live calls fail to start: `Unknown callback "onNotice"` from @fishaudio/agent-client対応中かも @NEAL3K が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
milind-soni/OpenMausBot#8345 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
w3c/feedvalidator#204 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
open-mmlab/mmcv#3352 ·
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100