Skip to content

Ppl API #14513

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

Merged
merged 50 commits into from
May 21, 2025
Merged

Ppl API #14513

merged 50 commits into from
May 21, 2025

Conversation

cherylEnkidu
Copy link
Contributor

No description provided.

@google-oss-bot
Copy link

google-oss-bot commented Feb 28, 2025

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

@cherylEnkidu cherylEnkidu assigned wu-hui and unassigned cherylEnkidu May 12, 2025
Copy link
Contributor

@wu-hui wu-hui left a comment

Choose a reason for hiding this comment

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

Great work, I think we just need to port more integration tests from web (or Android).

let functionName: String
let agrs: [Expr]

public init(_ functionName: String, _ agrs: [Expr]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

typo?

// See the License for the specific language governing permissions and
// limitations under the License.

public class ArrayContains: BooleanExpr, @unchecked Sendable {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need separate classes for these one? (CountAll, ArrayContains, etc.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These classes is used for convenient way to create expressions.

For ContAll and DocumentID, I am leaning towards keeping it since I don't want to introduce static method in Expr class.

Ascending("fieldname") is a syntax sugar.

But for ArrayContains("fieldname", "content"). I would like to remove it, since it doesn't save a lot work compared to Field("name").arraycontains("content").

.collection(path: "/foo")
.where(eq(field("foo"), constant("bar")))
.collection("/foo")
.where(Field("foo").eq(Constant("bar")))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use == here for demonstration purposes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would prefer to keep it consistent with API proposal. Since operator overload need to add extra method to the public API layer. It requires extra work to take it off when we release ppl.

"awards": ["hugo": true, "nebula": true],
],
]

@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
class PipelineIntegrationTests: FSTIntegrationTestCase {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should port all integration tests from either web or Android against this dataset.

@wu-hui wu-hui assigned cherylEnkidu and unassigned wu-hui May 12, 2025
// limitations under the License.

public class AggregateFunction: AggregateBridgeWrapper, @unchecked Sendable {
var bridge: AggregateFunctionBridge
Copy link
Member

Choose a reason for hiding this comment

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

Why is this mutable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for pointing this out! I have change these to non-mutating.

@cherylEnkidu cherylEnkidu merged commit 11ae3e2 into cheryllin/ppl May 21, 2025
29 of 33 checks passed
@cherylEnkidu cherylEnkidu deleted the cheryllin/pplapi branch May 21, 2025 01:00
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