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

Parameters for define statements #2

Merged
merged 30 commits into from
Sep 23, 2021
Merged

Parameters for define statements #2

merged 30 commits into from
Sep 23, 2021

Conversation

mtoy-googly-moogly
Copy link
Collaborator

@mtoy-googly-moogly mtoy-googly-moogly commented Aug 22, 2021

Parameter MVP

Parameterized explorables which can have required parameters, or optional parameters with default values.

Progress

  • Decide on provisional syntax
  • parameter declarations parsed to IR
  • Value parameter references parsed to IR
  • Condition Value parameters parsed to IR
  • Parse invocation syntax to IR
  • Implement reference to condition parameters
  • Generate SQL for expressions with parameters
  • Write some model/ tests for the generated SQL
  • Translation API reflects missing parameters and can parse an expression provided
  • Parameters inside of joins, paths
  • Reject expressions which are not compatible with parameters
  • Figure out what to do about @lloydtabb request for the gesture "users of this explore must provide some filter, any filter with a left hand side for this field"
  • Some syntax for a required filter which means "do not filter"

Syntax

  • Declaration
    define thingWithParams(
      has reqCondition : timestamp
      has optCondition : timestamp or @1960 to @1970
      has reqValue timestamp
      has optValue timestamp or @2001-09-11
      has constValue @1969-07-20 12:56
      ) is ('project.schema.tableName'
        ...
      
  • usage
flightsFiltered (departureFilter is @2003) | by_carrier

@mtoy-googly-moogly mtoy-googly-moogly marked this pull request as draft September 4, 2021 14:51
@mtoy-googly-moogly mtoy-googly-moogly marked this pull request as ready for review September 23, 2021 18:48
@mtoy-googly-moogly mtoy-googly-moogly merged commit 9b75958 into main Sep 23, 2021
@mtoy-googly-moogly mtoy-googly-moogly deleted the parameters branch September 23, 2021 18:48
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.

1 participant