-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
base: cheryllin/ppl
Are you sure you want to change the base?
Ppl API #14513
Conversation
Generated by 🚫 Danger |
There was a problem hiding this 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]) { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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"))) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
// limitations under the License. | ||
|
||
public class AggregateFunction: AggregateBridgeWrapper, @unchecked Sendable { | ||
var bridge: AggregateFunctionBridge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this mutable?
There was a problem hiding this comment.
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.
No description provided.