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

Align match behavior with case/== #6684

Merged
merged 2 commits into from
May 18, 2018
Merged

Align match behavior with case/== #6684

merged 2 commits into from
May 18, 2018

Commits on May 17, 2018

  1. Align match behavior with case/==

    Makes `["match", ["get", k], label, match, otherwise]` equivalent to `["case", ["==", ["get", k], label], match, otherwise]`. This changes the behavior of match expressions where the runtime type of the input does not match the type of the labels: previously such expressions produced a runtime type error and then fell back to the property default value; now they produce the fallback value from the match expression.
    jfirebaugh committed May 17, 2018
    Configuration menu
    Copy the full SHA
    c7f74bd View commit details
    Browse the repository at this point in the history

Commits on May 18, 2018

  1. Simplify categorical function conversion

    We can now take advantage of the relaxed typing for == and match, which allows full-fidelity conversion of categorical functions. Previously, we were relying on the default value being substituted at evaluation time if the input was not of the expected type. Now, case/match can handle that.
    jfirebaugh committed May 18, 2018
    Configuration menu
    Copy the full SHA
    2b9efe6 View commit details
    Browse the repository at this point in the history