Skip to content

Conversation

@lucasfang
Copy link
Collaborator

@lucasfang lucasfang commented Jan 30, 2026

Purpose

Predicate nullptr is not checked. This may cause coredump when EnablePredicateFilter is on and no predicate is set.

Tests

PredicateBatchReaderTest, TestInvalidInput

API and Format

Documentation

Copilot AI review requested due to automatic review settings January 30, 2026 03:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a null-check for PredicateBatchReader::Create() to prevent a crash when a null predicate is passed, and introduces a unit test covering that invalid input.

Changes:

  • Add explicit nullptr validation for predicate in PredicateBatchReader::Create().
  • Add a new unit test ensuring Create() fails with a clear error when predicate == nullptr.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/paimon/common/reader/predicate_batch_reader.cpp Adds early validation to avoid null-dereference when creating a predicate batch reader.
src/paimon/common/reader/predicate_batch_reader_test.cpp Adds a test case asserting Create() returns an error on null predicate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@lxy-9602 lxy-9602 left a comment

Choose a reason for hiding this comment

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

+1

@lucasfang lucasfang merged commit 60448b8 into alibaba:main Feb 2, 2026
8 of 13 checks passed
@lucasfang lucasfang deleted the fix_bug branch February 4, 2026 03:11
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