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
bbdbf9f3
Commit
bbdbf9f3
authored
9 years ago
by
Cam Saul
Browse files
Options
Downloads
Patches
Plain Diff
more fixes
parent
7bb1131e
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
test/metabase/driver/query_processor_test.clj
+34
-15
34 additions, 15 deletions
test/metabase/driver/query_processor_test.clj
with
34 additions
and
15 deletions
test/metabase/driver/query_processor_test.clj
+
34
−
15
View file @
bbdbf9f3
...
@@ -997,27 +997,46 @@
...
@@ -997,27 +997,46 @@
;;; Nested Field in ORDER
;;; Nested Field in ORDER
;; Let's get all the tips Kyle posted on Twitter sorted by tip.venue.name
;; Let's get all the tips Kyle posted on Twitter sorted by tip.venue.name
(
expect
(
expect
[[
446
"Cam's Mexican Gastro Pub"
[[
446
{
:mentions
[
"@cams_mexican_gastro_pub"
]
,
:tags
[
"#mexican"
"#gastro"
"#pub"
]
,
:service
"twitter"
,
:username
"kyle"
}]
{
:mentions
[
"@cams_mexican_gastro_pub"
]
,
:tags
[
"#mexican"
"#gastro"
"#pub"
]
,
:service
"twitter"
,
:username
"kyle"
}
[
230
"Haight European Grill"
"Cam's Mexican Gastro Pub is a historical and underappreciated place to conduct a business meeting with friends."
{
:mentions
[
"@haight_european_grill"
]
,
:tags
[
"#european"
"#grill"
]
,
:service
"twitter"
,
:username
"kyle"
}]
{
:large
"http://cloudfront.net/6e3a5256-275f-4056-b61a-25990b4bb484/large.jpg"
,
[
319
"Haight Soul Food Pop-Up Food Stand"
:medium
"http://cloudfront.net/6e3a5256-275f-4056-b61a-25990b4bb484/med.jpg"
,
{
:mentions
[
"@haight_soul_food_pop_up_food_stand"
]
,
:tags
[
"#soul"
"#food"
"#pop-up"
"#food"
"#stand"
]
,
:service
"twitter"
,
:username
"kyle"
}]
:small
"http://cloudfront.net/6e3a5256-275f-4056-b61a-25990b4bb484/small.jpg"
}
[
224
"Pacific Heights Free-Range Eatery"
{
:phone
"415-320-9123"
,
:name
"Cam's Mexican Gastro Pub"
,
:categories
[
"Mexican"
"Gastro Pub"
]
,
:id
"bb958ac5-758e-4f42-b984-6b0e13f25194"
}]
{
:mentions
[
"@pacific_heights_free_range_eatery"
]
,
:tags
[
"#free-range"
"#eatery"
]
,
:service
"twitter"
,
:username
"kyle"
}]]
[
230
{
:mentions
[
"@haight_european_grill"
]
,
:tags
[
"#european"
"#grill"
]
,
:service
"twitter"
,
:username
"kyle"
}
"Haight European Grill is a horrible and amazing place to have a birthday party during winter."
{
:large
"http://cloudfront.net/1dcef7de-a1c4-405b-a9e1-69c92d686ef1/large.jpg"
,
:medium
"http://cloudfront.net/1dcef7de-a1c4-405b-a9e1-69c92d686ef1/med.jpg"
,
:small
"http://cloudfront.net/1dcef7de-a1c4-405b-a9e1-69c92d686ef1/small.jpg"
}
{
:phone
"415-191-2778"
,
:name
"Haight European Grill"
,
:categories
[
"European"
"Grill"
]
,
:id
"7e6281f7-5b17-4056-ada0-85453247bc8f"
}]
[
319
{
:mentions
[
"@haight_soul_food_pop_up_food_stand"
]
,
:tags
[
"#soul"
"#food"
"#pop-up"
"#food"
"#stand"
]
,
:service
"twitter"
,
:username
"kyle"
}
"Haight Soul Food Pop-Up Food Stand is a underground and modern place to have breakfast on a Tuesday afternoon."
{
:large
"http://cloudfront.net/8f613909-550f-4d79-96f6-dc498ff65d1b/large.jpg"
,
:medium
"http://cloudfront.net/8f613909-550f-4d79-96f6-dc498ff65d1b/med.jpg"
,
:small
"http://cloudfront.net/8f613909-550f-4d79-96f6-dc498ff65d1b/small.jpg"
}
{
:phone
"415-741-8726"
,
:name
"Haight Soul Food Pop-Up Food Stand"
,
:categories
[
"Soul Food"
"Pop-Up Food Stand"
]
,
:id
"9735184b-1299-410f-a98e-10d9c548af42"
}]
[
224
{
:mentions
[
"@pacific_heights_free_range_eatery"
]
,
:tags
[
"#free-range"
"#eatery"
]
,
:service
"twitter"
,
:username
"kyle"
}
"Pacific Heights Free-Range Eatery is a wonderful and modern place to take visiting friends and relatives Friday nights."
{
:large
"http://cloudfront.net/cedd4221-dbdb-46c3-95a9-935cce6b3fe5/large.jpg"
,
:medium
"http://cloudfront.net/cedd4221-dbdb-46c3-95a9-935cce6b3fe5/med.jpg"
,
:small
"http://cloudfront.net/cedd4221-dbdb-46c3-95a9-935cce6b3fe5/small.jpg"
}
{
:phone
"415-901-6541"
,
:name
"Pacific Heights Free-Range Eatery"
,
:categories
[
"Free-Range"
"Eatery"
]
,
:id
"88b361c8-ce69-4b2e-b0f2-9deedd574af6"
}]]
(
Q
run
against
geographical-tips
using
mongo
(
Q
run
against
geographical-tips
using
mongo
return
:data
:rows
(
map
(
fn
[[
id
source
_
{
venue-name
:name
}]]
[
id
venue-name
source
]))
return
:data
:rows
aggregate
rows
of
tips
aggregate
rows
of
tips
filter
and
=
source...service
"twitter"
filter
and
=
source...service
"twitter"
=
source...username
"kyle"
=
source...username
"kyle"
order
venue...name
))
order
venue...name
))
;; Nested Field in AGGREGATION
;; Nested Field in AGGREGATION
(
expect
(
expect
99
{}
(
Q
run
against
geographical-tips
using
mongo
(
Q
run
against
geographical-tips
using
mongo
return
:data
:rows
first
first
return
:data
:rows
aggregate
distinct
venue...name
of
tips
))
aggregate
distinct
venue...name
of
tips
))
;;; Nested Field in BREAKOUT
;;; Nested Field in BREAKOUT
...
...
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