Skip to content

object: add target-side CSV select MVP#326

Closed
Rohithmatham12 wants to merge 1 commit into
NVIDIA:mainfrom
Rohithmatham12:object-select-server-mvp
Closed

object: add target-side CSV select MVP#326
Rohithmatham12 wants to merge 1 commit into
NVIDIA:mainfrom
Rohithmatham12:object-select-server-mvp

Conversation

@Rohithmatham12

Copy link
Copy Markdown
Contributor

Summary

  • Add ais object select as a limited CSV MVP that routes through AIS instead of filtering locally in the CLI.
  • Add a select-obj object POST action; the proxy redirects to the owning target, and the target reads the source object via LOM.GetROC and streams selected CSV rows.
  • Add api.SelectObjectReader for callers that want the server-side object-select response stream.
  • Keep the first scope narrow: CSV input/output, SELECT projection, SELECT *, optional FROM, and simple string/numeric WHERE predicates.
  • Add shared selector coverage plus a target-side regression that stores a CSV object and exercises the target selection path.

Why
This replaces the closed client-side prototype in #310 with the server/target-side MVP requested in review. The CLI no longer performs a normal full-object GET and filters locally; it POSTs an object action to AIS, and the target performs the read/filter/stream path.

Scope / non-goals

  • No S3 Select compatibility yet.
  • No Parquet/JSON/DuckDB integration yet.
  • No predicate pushdown into remote backend format readers yet.
  • This is a stage-one CSV path intended to make the API, proxy routing, target execution, and streaming response shape reviewable.

Testing

  • GOCACHE=/private/tmp/aistore-select-gocache GOMODCACHE=/private/tmp/aistore-select-gomodcache go test ./cmn
  • GOCACHE=/private/tmp/aistore-select-gocache GOMODCACHE=/private/tmp/aistore-select-gomodcache go test ./api
  • GOCACHE=/private/tmp/aistore-select-gocache GOMODCACHE=/private/tmp/aistore-select-gomodcache go test ./ais -run TestObjSelectRunsOnTarget
  • cd cmd/cli && GOCACHE=/private/tmp/aistore-select-gocache GOMODCACHE=/private/tmp/aistore-select-gomodcache go test ./cli
  • git diff --check

Replaces the closed client-side prototype #310.
Refs #305.

import (
"fmt"
"io"
"net/http"

@alex-aizman alex-aizman Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. unacceptable heap allocation in the critical path
  2. matchSelectPredicate is called in the main loop (for each row) and parses the same user-given value - unacceptable as well

@alex-aizman

Copy link
Copy Markdown
Member

Closing (comment inline)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants