Skip to content

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

Closed
luffy-zh wants to merge 2 commits intoapache:mainfrom
luffy-zh:ORC-1884
Closed

ORC-1884: [C++] Add a maybe() API to the SearchArgumentBuilder#2207
luffy-zh wants to merge 2 commits intoapache:mainfrom
luffy-zh:ORC-1884

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

@dongjoon-hyun
Copy link
Member

Let me merge this.

@dongjoon-hyun dongjoon-hyun added this to the 2.2.0 milestone Jun 30, 2025
@dongjoon-hyun
Copy link
Member

Thank you, @luffy-zh and all.

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