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

Allow @transform directive to be applied to properties. #617

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0f83d67
Allow query outputs to refer to a `FieldRef`. (#615)
obi1kenobi Jun 11, 2024
c5e1bdf
Accept `FieldRef` for fold-specific field outputs in IR. (#616)
obi1kenobi Jun 11, 2024
e9be0ea
Allow `FieldRef` in fold post-filtering operations. (#618)
obi1kenobi Jun 12, 2024
0e749c8
Refactor IR to allow transformed values on the LHS of filter operatio…
obi1kenobi Jun 13, 2024
0b5ea39
Initial "transform on properties" data structures and updates to erro…
obi1kenobi Jun 15, 2024
977d1a7
Add `TransformedField` variant to `FieldRef` used for tags. (#625)
obi1kenobi Jun 15, 2024
387c1ff
Implement execution for `@transform` applied to filters' left-hand op…
obi1kenobi Jun 15, 2024
1bb0dea
Deduplicate transform groups in parser and assign `Tid`s to each.
obi1kenobi Jun 16, 2024
9bae1ee
Partially implement `@transform` on properties in frontend.
obi1kenobi Jun 16, 2024
0b748c2
Implemented minimal portion of transform execution logic.
obi1kenobi Jun 18, 2024
9ffbf82
Implement frontend for handling `@filter` on transformed properties.
obi1kenobi Jun 18, 2024
da48215
Minor cleanup refactoring.
obi1kenobi Jun 19, 2024
20cc45d
Produce proper error if `count` transform is used on a property-like …
obi1kenobi Jun 19, 2024
54bbfca
Catch more instances of invalid `@transform` use and offer useful adv…
obi1kenobi Jun 20, 2024
1a57d68
Implement filters, tags, and outputs for transformed fold-count values.
obi1kenobi Jun 20, 2024
05a8caa
Handle repeated `@transform(op: "count")` directives where only first…
obi1kenobi Jun 20, 2024
5c1226d
Handle duplicate-output-name errors with transformed fields.
obi1kenobi Jun 20, 2024
639131d
Implement using transformed values in a tag.
obi1kenobi Jun 24, 2024
ad7b6c3
Finalize implementation of outputing transformed values.
obi1kenobi Jun 24, 2024
b3aa219
Return appropriate parser/frontend errors for invalid transforms.
obi1kenobi Jun 25, 2024
d79f172
Report variable type conflicts in both filters and transforms.
obi1kenobi Jun 25, 2024
99d8189
Update downstream project's schemas to include new feature.
obi1kenobi Jun 25, 2024
5a31e02
Fix output type inference when using tags from optional scopes.
obi1kenobi Jul 2, 2024
fd5a19c
Fix variables detection in transformed properties with transformed tag.
obi1kenobi Jul 3, 2024
1b2cde2
Handle lookups of transformed values while resolving transformed tag.
obi1kenobi Jul 5, 2024
01f6a49
Ensure unused transform arguments are cleaned up from the stack.
obi1kenobi Jul 6, 2024
2685817
Add test case for `@transform` with a tag that is itself transformed.
obi1kenobi Jul 6, 2024
bf0bdcc
Add test coverage for cyclic uses of transform + tags.
obi1kenobi Jul 6, 2024
009363e
Implement `sqrt` transform.
obi1kenobi Jul 7, 2024
bed2ac5
Improve transform argument type inference test coverage.
obi1kenobi Jul 7, 2024
eb72c70
Merge branch 'main' into transform_on_properties
obi1kenobi Jul 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions experiments/schemaless/src/schema_inference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ directive @output(name: String) on FIELD
directive @optional on FIELD
directive @recurse(depth: Int!) on FIELD
directive @fold on FIELD
directive @transform(op: String!) on FIELD
directive @transform(op: String!, value: [String!]) on FIELD

type GitHubActionsImportedStep implements _AnonType5 {
_AnonField: String
Expand Down Expand Up @@ -718,7 +718,7 @@ directive @output(name: String) on FIELD
directive @optional on FIELD
directive @recurse(depth: Int!) on FIELD
directive @fold on FIELD
directive @transform(op: String!) on FIELD
directive @transform(op: String!, value: [String!]) on FIELD

type GitHubActionsImportedStep implements _AnonType5 {
_AnonField: String
Expand Down Expand Up @@ -787,7 +787,7 @@ directive @output(name: String) on FIELD
directive @optional on FIELD
directive @recurse(depth: Int!) on FIELD
directive @fold on FIELD
directive @transform(op: String!) on FIELD
directive @transform(op: String!, value: [String!]) on FIELD

type GitHubActionsImportedStep implements _AnonType5 {
_AnonField: String
Expand Down Expand Up @@ -859,7 +859,7 @@ directive @output(name: String) on FIELD
directive @optional on FIELD
directive @recurse(depth: Int!) on FIELD
directive @fold on FIELD
directive @transform(op: String!) on FIELD
directive @transform(op: String!, value: [String!]) on FIELD

type GitHubActionsRunStep implements _AnonType5 {
_AnonField: String
Expand Down Expand Up @@ -938,7 +938,7 @@ directive @output(name: String) on FIELD
directive @optional on FIELD
directive @recurse(depth: Int!) on FIELD
directive @fold on FIELD
directive @transform(op: String!) on FIELD
directive @transform(op: String!, value: [String!]) on FIELD

type HackerNewsComment implements _AnonType2 {
_AnonField: String
Expand Down Expand Up @@ -994,7 +994,7 @@ directive @output(name: String) on FIELD
directive @optional on FIELD
directive @recurse(depth: Int!) on FIELD
directive @fold on FIELD
directive @transform(op: String!) on FIELD
directive @transform(op: String!, value: [String!]) on FIELD

type GitHubRepository implements _AnonType2 {
_AnonField: String
Expand Down
Loading
Loading