Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

resolves: an as-of mode - the newest register row on or before the record's date (exchange rates, price changes), not only a covering validity period

オープン
#7,916 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
backend, databases

調査の方向性

Start by reading the existing resolves: implementation from issue #6712 and trace how it evaluates between matches, orders candidates, and reports ambiguous or notFound. Add an as-of mode that selects the newest row with start on or before the record date; done means equal start dates remain ambiguous and dates with no earlier row return notFound. The payload names no source files or tests, so locate the implementation and its tests before making changes.

索引モデルが issue の本文から書いたものです。

説明

Problem

resolves: (#6712) fills a to-one, and with copy: scalars, from the register row whose validity period covers a date of the record (between: { start, end, value }). Two register rows covering the same date are reported as ambiguous, never picked from.

A very common register has no end date: a dated quote series. Exchange rates (one CurrencyRate row per currency per publication day), price changes and tax-rate changes all work this way. Each row is valid from its date until the next row replaces it. Declared with between: { start: date, value: date } and no end, every older row is open-ended too, so all of them cover the record's date and every lookup is ambiguous. Declared with start: date, end: date, a record dated on a day with no quote (a weekend, a holiday, a day the bank published nothing) is notFound. The rule the business applies is simple: take the newest row whose date is on or before the record's date. The construct cannot say it.

Ask

An as-of mode on between:

resolves:
  - name: invoiceRate
    event: { onCreate: SalesInvoice }
    from: CurrencyRate
    match: { Currency: Currency }
    between: { start: date, value: date, asOf: true }   # newest row with start <= value
    copy: { rate: rate }                                 # snapshot onto SalesInvoice.rate
    outcome: rateResolution

With asOf: true the lookup orders the candidates by start descending and takes the first row whose start <= value. ambiguous then means only two rows with the same start. notFound means no row on or before the date.

Where it is needed

BusinessIntents/base-journal#80, realised FX differences on settlement. The invoice and the payment each need the rate effective on their own date. The difference between the two, times the settled amount, is the 624 / 724 posting.

主要言語
Java
スター
278
フォーク
97
平均マージ
16時間 46分
マージ済み PR(30日)
265

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-dirigible/dirigible のほかの issue

eclipse-dirigible/dirigible の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。