Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
802997a3
Commit
802997a3
authored
9 years ago
by
Cam Saul
Browse files
Options
Downloads
Patches
Plain Diff
fix add-implicit-fields logic
parent
a13b131e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/metabase/driver/query_processor.clj
+3
-2
3 additions, 2 deletions
src/metabase/driver/query_processor.clj
with
3 additions
and
2 deletions
src/metabase/driver/query_processor.clj
+
3
−
2
View file @
802997a3
...
...
@@ -116,10 +116,11 @@
(
defn
add-implicit-fields
"Add an implicit `fields` clause to queries with `rows` aggregations."
[{
:keys
[
fields
aggregation
source_table
]
:as
query
}]
[{
:keys
[
fields
aggregation
breakout
source_table
]
:as
query
}]
(
cond->
query
;; If we're doing a "rows" aggregation with no fields clause add one that will exclude Fields that are supposed to be hidden
;; If we're doing a "rows" aggregation with no
breakout or
fields clause
s
add one that will exclude Fields that are supposed to be hidden
(
and
(
=
aggregation
[
"rows"
])
(
not
breakout
)
(
not
fields
))
(
assoc
:fields
(
sel
:many
:id
Field
:table_id
source_table,
:active
true,
:preview_display
true,
:field_type
[
not=
"sensitive"
]))))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment