Skip to content

pxf: DatasetReader.scan forces skipValidate, keeps MaxMessageSize, and positions every row error #194

Open

Description

@bfrancojr

protowire-go is changing DatasetReader.Scan (trendvidia/protowire-go#280, PR trendvidia/protowire-go#281; decided in trendvidia/protowire-cpp#166). Scan will bind each row under all the caller's options except MaxMessageSize, as the options-taking BindRow does. When a row is bound, only a decode error gets the row's position (2:1: column pw: ...). A schema violation (PXF schema violations: ...) and a validator's error (check: ...) come back as they are, with no position. protowire-cpp already behaves this way (PR trendvidia/protowire-cpp#174).

What this port does (from reading the code at c685ff0, not run)

  • DatasetReader.scan passes the reader's options, but BindRow.bind sets withSkipValidate(true). The comment says the descriptor was already validated, but no such check was found in DatasetReader. If so, a schema violation can never come out of scan, while Go reports one.
  • MaxMessageSize is not lifted for the row's body. Go binds at the default, because the body repeats the column names and is wider than the row.
  • atRow (BindRow.java L206–216) gives every caught PxfException the row's position, schema violations included.
  • The port has no secret-hook or validator option, so those cases don't apply.

Done when

  • Each option the port has goes through Scan, with a test per option. The cases to copy are in protowire-go's encoding/pxf/dataset_scan_options_test.go on #281: the same row bound through Scan and through BindRow must give the same message or the same error, and the texts must match.
  • Row errors are positioned as Go positions them.

Blocked by trendvidia/protowire-go#280 (merge of #281).

Activity

  1. bfrancojr commented on Nov 7, 2026

    @bfrancojr
    CollaboratorAuthor

    Unblocked: trendvidia/protowire-go#281 merged (8894b7b), which closed #280. The reference tests are in encoding/pxf/dataset_scan_options_test.go on protowire-go main.

  2. bfrancojr commented on Nov 8, 2026

    @bfrancojr
    CollaboratorAuthor

    Two cases this issue set aside because Java has no such option are now filed: #205 (Validator hook) and #206 (OnSecretField). Each says scan and BindRow must pass it on. So this issue covers the options Java has today, and those two cover the rest.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions