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

Custom Expression validator too strict when field name is the same as a function #21513

Closed
flamber opened this issue Apr 7, 2022 · 1 comment · Fixed by #21537
Closed

Custom Expression validator too strict when field name is the same as a function #21513

flamber opened this issue Apr 7, 2022 · 1 comment · Fixed by #21537
Assignees
Labels
.Frontend Priority:P2 Average run of the mill bug Querying/Notebook/Custom Expression .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Milestone

Comments

@flamber
Copy link
Contributor

flamber commented Apr 7, 2022

Describe the bug
Custom Expression validator does not allow field names that are the same as functions e.g [Count] * 2
Regression since 0.42

Workaround: For metrics, create a Custom Expression with a custom name (e.g. MyCount). For fields, change the name in the Data Model.

To Reproduce

  1. Question > Sample > Products
  2. Summarize Count grouped by Category
  3. Custom Column [Count] * 2 as "CC" - errors with Expecting number but found function Count returning aggregation
    image

Information about your Metabase Installation:
Tested 0.41.6 thru 0.42.3/4 and master

@flamber flamber added Type:Bug Product defects Priority:P2 Average run of the mill bug .Frontend .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. Querying/Notebook/Custom Expression labels Apr 7, 2022
@ariya ariya self-assigned this Apr 7, 2022
ariya added a commit that referenced this issue Apr 10, 2022
ariya added a commit that referenced this issue Apr 11, 2022
@nemanjaglumac nemanjaglumac added the .Reproduced Issues reproduced in test (usually Cypress) label Apr 11, 2022
@ariya ariya linked a pull request Apr 12, 2022 that will close this issue
@camsaul
Copy link
Member

camsaul commented Apr 13, 2022

Ran into the same thing today on master, but my column name is count

image

@flamber flamber added this to the 0.43 milestone Apr 13, 2022
This was referenced Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Frontend Priority:P2 Average run of the mill bug Querying/Notebook/Custom Expression .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants