← Back to Pull requests

GH-55448: [C++][Parquet] Optimize ALP and support per-column vector sizes #55449

Open
unknown opened this pull request with 178 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 09, 2026 06:05 UTC
Author

Rationale for this change

This PR addresses follow-up items from #48345 to improve ALP performance, format compatibility, and writer configuration.

What changes are included in this PR?

  • Add EncodingOptions and AlpOptions to configure the ALP vector size globally or per column.

  • Accept unsorted and duplicate exception positions. Use a vectorizable bounds and ordering check.

  • Load encoding and decoding multipliers before value loops.

  • Write each encoded vector and its offset directly to the page buffer.

  • Use stack storage for second-level sampling, avoiding a sample allocation for each vector parameter search.

  • Write non-null values directly to the encoder buffer in PutSpaced().
  • Are these changes tested?

    Yes. I ran the ALP and Parquet tests and the new benchmarks from #55714.

    Are there any user-facing changes?

    Yes. Writers can set AlpOptions::vector_size through WriterProperties::Builder::encoding_options(). The default is 1,024 values. Supported sizes are powers of two from 8 through 32,768.

    The exported MakeEncoder signature and writer property layouts change, so C++ consumers need to rebuild.

    Was AI used for this PR?

    AI assisted with implementation, review, test execution, and benchmarking.

    PR code and description written by:

  • Human

  • AI
  • Reviewed before submission by:

  • Human

  • AI

  • Not reviewed
  • GitHub Issue: #55448
  • Diff: 178 lines (+133 / -45) across 2 files Reviewer: pitrou Review duration: 33115m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.35) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.35 · 178 lines diff across 2 files
    0.35
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.310
    Real PR Conversation Timeline
    1 comments
    "Review active on #55449"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 35.5% (MEDIUM) · Higher = larger blast radius
    35.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.9% · Safe to merge
    18.9%
    Repository