Skip to content
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

Adds Fn, FnProvider, Agg, and AggProvider APIs #1722

Merged
merged 9 commits into from
Jan 24, 2025

Conversation

johnedquinn
Copy link
Member

@johnedquinn johnedquinn commented Jan 21, 2025

Description

  • Cleans up the Function and Aggregation APIs by creating distinct APIs for providing functions as well as implementing functions.
  • Adds Javadocs to each class/method. Performed the audit.
  • There is one more failing conformance test (MYSQL_SELECT_29), however, this doesn't pass in the old evaluator. See the report. It passes locally, but it times out on the remote runner.

Reviewing

  • The functionality is the same. The APIs are now cleaned up to remove unnecessary methods, and the naming is more indicative of the underlying class's definition.

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@johnedquinn johnedquinn force-pushed the main-fn-agg-apis branch 2 times, most recently from 7ad1acc to 609f1ea Compare January 21, 2025 16:48
@johnedquinn johnedquinn marked this pull request as ready for review January 21, 2025 16:53
@johnedquinn johnedquinn requested a review from alancai98 January 21, 2025 16:54
@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.03%. Comparing base (4bf549b) to head (dfb15e0).
Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1722   +/-   ##
=========================================
  Coverage     80.03%   80.03%           
  Complexity       47       47           
=========================================
  Files            19       19           
  Lines           506      506           
  Branches         23       23           
=========================================
  Hits            405      405           
  Misses           88       88           
  Partials         13       13           
Flag Coverage Δ
EXAMPLES 80.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@alancai98 alancai98 left a comment

Choose a reason for hiding this comment

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

latest changes lgtm. seems like there's a slight conformance regression with this PR -- https://github.com/partiql/partiql-lang-kotlin/actions/runs/12917164270. could we verify we're not introducing any behavior changes?

Adds a RoutineSignature and RoutineProviderSignature

Adds a RoutineProviderParam

Adds scalar and aggregate function builders

Updates existing function implementations to use new APIs
Removes the RoutineProviderParameter in favor of PType

Updates Javadocs

Renames internal SUBSTRING name
@johnedquinn johnedquinn requested a review from alancai98 January 24, 2025 17:07
Comment on lines 316 to 319
p.type.code() == a.code() -> continue
a.code() == PType.DYNAMIC -> mapping[i] = Ref.Cast(a.toCType(), p.type.toCType(), Ref.Cast.Safety.COERCION, true)
p.type.code() == PType.DYNAMIC -> continue
else -> mapping[i] = coercion(a, p.type) ?: return null
Copy link
Member

Choose a reason for hiding this comment

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

could we add a small comment/description of what these additional branches are for?

alancai98
alancai98 previously approved these changes Jan 24, 2025
@johnedquinn johnedquinn merged commit f3a65ff into partiql:main Jan 24, 2025
7 checks passed
@johnedquinn johnedquinn deleted the main-fn-agg-apis branch January 24, 2025 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants