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

Table Api Query on Int64 (long) column returning extra results

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
databases

調査の方向性

QueryParser.ts から始め、12L や 13L のような Int64 値を使って報告されたテーブルクエリを再現し、L サフィックスなしの同じクエリの結果と比較します。フィルタリング中に visitNumber の long リテラルがどのように表現され、消費されるかを追跡します。Int64 の範囲クエリが、小さい数値の場合を超える値も含め、一致するエンティティのみを返せば完了です。

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

説明

table-storage
Which service(blob, file, queue, table) does this issue concern?

table

Which version of the Azurite was used?

3.29

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

npm and ran code from github main

What's the Node.js version?

9.8.1

What problem was encountered?

GET /devstoreaccount1/table()?$filter=PartitionKey%20ne%20%27Current%27%20and%20PlayIndex%20ge%2012L%20and%20PlayIndex%20lt%2013L HTTP/1.1

I do a query and find elements with playindex 12 (expected) but also 120-129 (wrong). This works perfectly fine against azure storage account so is specific to azurite. Also works fine if you drop the L from the query so it treats params as Int32.

Steps to reproduce the issue?

Add entities with a Int64 column and increment +1 each time to new column (add loads) then do a query for less than or equal to a small number and you'll get the extra results.

Have you found a mitigation/solution?

Workaround - dropping the L's off the query does the trick but fearful I may run into trouble on bigger numbers.

Solution attempt - I've had a dig around the code and it is because the filter value 13 is stored as a string as opposed to numeric so I ended up here:

QueryParser.ts

private visitNumber(): IQueryNode {
    const token = this.tokens.next(t => t.kind === "number") || this.throwUnexpectedToken("number");

    if (token.value!.endsWith("L")) {
      // This is a "long" number, which should be represented by its string equivalent
      return new ConstantNode(token.value!.substring(0, token.value!.length - 1));
    } else {
      return new ConstantNode(parseFloat(token.value!));
    }
  }

Adding a parseInt around the substring makes my case work correctly but the comment above suggests this is wrong, probably due to node numbers being smaller than int64. To try and fix I believe would entail a large code change that unfortunately I don't have the time for.

主要言語
TypeScript
スター
2.3k
フォーク
399
平均マージ
1日 2時間
マージ済み PR(30日)
49

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

Azure/Azurite のほかの issue

Azure/Azurite の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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