Skip to content

ORC-1884: [C++] Add a maybe() API to the SearchArgumentBuilder #2207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

luffy-zh
Copy link
Contributor

@luffy-zh luffy-zh commented May 3, 2025

What changes were proposed in this pull request?

Add a maybe() API to the SearchArgumentBuilder to allow the insertion of an expression tree that is currently unsupported.

Why are the changes needed?

To enhance the SearchArgumentBuilder API with a new method called maybe(), we can create a SearchArgument tree for scenarios that may not be adequately addressed by existing methods.

How was this patch tested?

Uts in TestSearchArgument.cc can cover this patch.

Was this patch authored or co-authored using generative AI tooling?

NO

@github-actions github-actions bot added the CPP label May 3, 2025
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

Thank you for making a PR.

For the following claims, It seems unclear to me because there is no actual test case.

Allow the insertion of an expression tree that is currently unsupported.

I'd like to recommend the following.

  • Revert the change on the existing test case.
  • Add a new test case which shows the claim, "the insertion of an expression tree that is currently unsupported".

In general, your new test case should verify your code contribution. For example, the new test case should fail without your patch. AFAIK, this PR only adds .maybe() to the existing successful test cases. So, it's improper to validate this PR's contribution.

@ffacs
Copy link
Contributor

ffacs commented May 6, 2025

Is maybe() a shortcut of literal(TruthValue::YES_NO_NULL)?

@luffy-zh
Copy link
Contributor Author

Is maybe() a shortcut of literal(TruthValue::YES_NO_NULL)?
Yes, maybe() can be considered a shortcut for literal(TruthValue::YES_NO_NULL). It provides a more concise way to express uncertainty or ambiguity in truth values.

Copy link
Contributor

@ffacs ffacs left a comment

Choose a reason for hiding this comment

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

LGTM

@dongjoon-hyun
Copy link
Member

Hi, Yuanping (@ffacs), if you think it's okay, you can merge this. Feel free to merge this PR because I removed my review here. 😄

Copy link
Member

@williamhyun williamhyun left a comment

Choose a reason for hiding this comment

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

+1 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants