Skip to content

Conversation

@BiteTheDDDDt
Copy link
Contributor

What problem does this PR solve?

This pull request extends the set utilities in the pipeline to support nullable string keys in hash tables. The main changes involve introducing a new method for handling nullable string columns, updating the variant types to include this method, and adjusting the logic for selecting the appropriate method based on nullability. Additionally, a new regression test output file has been added.

Enhancements to set utilities for nullable string support:

  • Introduced SetMethodOneStringNullable for handling nullable string columns, using MethodSingleNullableColumn with a DataWithNullKey wrapper.
  • Updated the SetHashTableVariants type to include the new SetMethodOneStringNullable variant.
  • Modified the SetDataVariants struct to select SetMethodOneStringNullable when the string key is nullable, otherwise defaulting to the non-nullable version.

Testing:

  • Added a new regression test output file at regression-test/data/query_p0/set/rqg_prod_20240226/rqg_prod_20240226.out to cover the new functionality.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

Copilot AI review requested due to automatic review settings January 20, 2026 09:03
@Thearas
Copy link
Contributor

Thearas commented Jan 20, 2026

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

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 pull request fixes a bug where set operators (EXCEPT, INTERSECT, UNION) incorrectly treated empty strings as NULL values when processing nullable string columns. The fix introduces support for nullable string keys in hash tables used by set operators.

Changes:

  • Added SetMethodOneStringNullable type definition for handling nullable string columns with proper NULL key handling
  • Updated SetHashTableVariants to include the new nullable string method variant
  • Modified SetDataVariants::init() to conditionally select nullable vs non-nullable string methods based on column nullability
  • Added regression test case to verify the fix works correctly

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
be/src/pipeline/common/set_utils.h Added nullable string hash table method and conditional logic for string key selection
regression-test/suites/query_p0/set/rqg_prod_20240226/rqg_prod_20240226.groovy Test suite definition with table creation and query execution
regression-test/suites/query_p0/set/rqg_prod_20240226/data Test data insert statements for the tables
regression-test/data/query_p0/set/rqg_prod_20240226/rqg_prod_20240226.out Expected output file for the regression test

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

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 80.00% (4/5) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.40% (19041/36341)
Line Coverage 35.69% (176344/494063)
Region Coverage 32.23% (136523/423623)
Branch Coverage 33.14% (59060/178189)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (5/5) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.09% (26033/35620)
Line Coverage 56.10% (276842/493505)
Region Coverage 53.90% (230780/428126)
Branch Coverage 55.52% (99359/178950)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants