Say in the docs that a seek never reaches the rows whose ordered property is null

オープン 初心者向け
#529 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
90/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
neo4j, postgresql, python

調査の方向性

docs/06-object-manager.mdのseekの説明の隣を更新してください。既存のseekの説明を読み、issueで引用されている例およびDrivine4jの段落と比較してください。後続ページで行に到達するには、順序付けに使うプロパティがnullであってはならないこと、またユーザーはwhereでnullをフィルタリングするか、常に値を持つプロパティで順序付けできることを記述してください。

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

説明

The docs don't say that a seek drops every row whose ordered property is null from each page after the first, as drivine4j's do (docs/06-object-manager.md, "The ordered properties must be non-null in the data").

await gom.save_all([S(id="a", rank=1), S(id="b", rank=2), S(id="c"), S(id="d")])
q = refs(S)
await gom.load_all(S, order_by=[q.rank.asc(), q.id.asc()])                      # a, b, c, d
await gom.load_all(S, order_by=[q.rank.asc(), q.id.asc()], limit=2,
                   seek=[q.rank.after(2), q.id.after("b")])                     # []: c and d are never reached

Seen on SQLite. A null sort key satisfies no comparison on any store, the graph engines' Cypher included, so this is how keyset paging works, not a bug: an order that places its nulls is already refused with seek. But a user paging over an optional property loses rows without a word.

The fix is docs: say, beside seek, that its ordered properties must be non-null in the data, and that a user should filter nulls out in where or order by a property that always has a value. drivine4j's paragraph can be taken as it is.

主要言語
Python
スター
2
フォーク
0
平均マージ
3時間 40分
マージ済み PR(30日)
219

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

liberation-data/drivine-python のほかの issue

liberation-data/drivine-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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