Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Subtask]: [Dashboard] Support filters of Snapshots page for table #2198

Closed
3 tasks done
Tracked by #1354
wangtaohz opened this issue Oct 26, 2023 · 1 comment · Fixed by #2307 or #2340
Closed
3 tasks done
Tracked by #1354

[Subtask]: [Dashboard] Support filters of Snapshots page for table #2198

wangtaohz opened this issue Oct 26, 2023 · 1 comment · Fixed by #2307 or #2340
Labels
type:subtask Subtask of another issue

Comments

@wangtaohz
Copy link
Contributor

Search before asking

  • I have searched in the issues and found no similar issues.

Description

Support filters for Snapshots page. As desceibed in #2034 , we are going to support two filters in the Snapshots page.

image

Branches/Tags Filter:

Operations Filter:

  • the list contains 3 fixed items, all,optimizing,non-optimizing
  • all is the default value
  • after swith a tag/branch, the operations filter should change to select the default value all
  • only support select 1 operation at a time

Both filters will task effects on the HTTP API .../tables/{table}/snapshots in the format of:
.../tables/{table}/snapshots?ref={tag/branch}&operation={all}

Besides, we also have to support displying how many branches and tags there are, which also comes from this HTTP API

Parent issue

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@wangtaohz
Copy link
Contributor Author

wangtaohz commented Nov 14, 2023

The design of related Http API

  1. get branches/tags of a table

/ams/v1/tables/catalogs/iceberg/dbs/{db}/tables/{user}/branches
/ams/v1/tables/catalogs/iceberg/dbs/{db}/tables/{user}/tags

{
  "message": "success",
  "code": 200,
  "result": {
    "list": [
      {
        "name": "testbranch2",
        "snapshotId": 8129102276487498000,
        "minSnapshotsToKeep": null,
        "maxSnapshotAgeMs": null,
        "maxRefAgeMs": null,
        "type": "branch"
      },
      {
        "name": "main",
        "snapshotId": 8334851092700841000,
        "minSnapshotsToKeep": null,
        "maxSnapshotAgeMs": null,
        "maxRefAgeMs": null,
        "type": "branch"
      },
      {
        "name": "audit-branch",
        "snapshotId": 8129102276487498000,
        "minSnapshotsToKeep": null,
        "maxSnapshotAgeMs": null,
        "maxRefAgeMs": null,
        "type": "branch"
      },
      {
        "name": "testbranch1",
        "snapshotId": 8129102276487498000,
        "minSnapshotsToKeep": null,
        "maxSnapshotAgeMs": null,
        "maxRefAgeMs": null,
        "type": "branch"
      }
    ],
    "total": 4
  }
}

2./ams/v1/tables/catalogs/iceberg/dbs/{db}/tables/{user}/snapshots?ref=testbranch2?operation=non-optimizing

{
  "message": "success",
  "code": 200,
  "result": {
    "list": [
      {
        "snapshotId": "8129102276487497637",
        "fileCount": 2,
        "fileSize": "1.79KB",
        "records": 3,
        "commitTime": 1699876543764,
        "operation": "overwrite",
        "producer": "INGESTION",
        "summary": {
          "added-data-files": "2",
          "total-equality-deletes": "0",
          "added-records": "3",
          "replace-partitions": "true",
          "total-records": "3",
          "spark.app.id": "local-1699876539350",
          "changed-partition-count": "2",
          "total-position-deletes": "0",
          "added-files-size": "1.79KB",
          "total-delete-files": "0",
          "total-files-size": "1.79KB",
          "total-data-files": "2"
        },
        "recordsSummaryForChart": {
          "total-records": "3",
          "eq-delete-records": "0",
          "pos-delete-records": "0"
        },
        "filesSummaryForChart": {
          "delete-files": "0",
          "total-files": "2",
          "data-files": "2"
        },
        "originalFileSize": 1837
      }
    ],
    "total": 1
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:subtask Subtask of another issue
Projects
None yet
1 participant