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
1fb60721
Commit
1fb60721
authored
7 years ago
by
Cam Saül
Browse files
Options
Downloads
Patches
Plain Diff
Test updates
[ci drivers]
parent
bbbf86e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/metabase/driver/generic_sql/native_test.clj
+14
-14
14 additions, 14 deletions
test/metabase/driver/generic_sql/native_test.clj
test/metabase/query_processor/middleware/annotate_and_sort_test.clj
+2
-2
2 additions, 2 deletions
...ase/query_processor/middleware/annotate_and_sort_test.clj
with
16 additions
and
16 deletions
test/metabase/driver/generic_sql/native_test.clj
+
14
−
14
View file @
1fb60721
...
...
@@ -8,28 +8,28 @@
;; Just check that a basic query works
(
expect
{
:status
:completed
{
:status
:completed
:row_count
2
:data
{
:rows
[[
100
]
[
99
]]
:columns
[
"ID"
]
:cols
[{
:
name
"ID"
,
:base_type
:type/Integer
}]
:native_form
{
:query
"SELECT ID FROM VENUES ORDER BY ID DESC LIMIT 2;"
}}}
:data
{
:rows
[[
100
]
[
99
]]
:columns
[
"ID"
]
:cols
[{
:name
"ID"
,
:display_
name
"ID"
,
:base_type
:type/Integer
}]
:native_form
{
:query
"SELECT ID FROM VENUES ORDER BY ID DESC LIMIT 2;"
}}}
(
qp/process-query
{
:native
{
:query
"SELECT ID FROM VENUES ORDER BY ID DESC LIMIT 2;"
}
:type
:native
:database
(
id
)}))
;; Check that column ordering is maintained
(
expect
{
:status
:completed
{
:status
:completed
:row_count
2
:data
{
:rows
[[
100
"Mohawk Bend"
46
]
[
99
"Golden Road Brewing"
10
]]
:columns
[
"ID"
"NAME"
"CATEGORY_ID"
]
:cols
[{
:name
"ID"
,
:base_type
:type/Integer
}
{
:name
"NAME"
,
:base_type
:type/Text
}
{
:name
"CATEGORY_ID"
,
:base_type
:type/Integer
}]
:native_form
{
:query
"SELECT ID, NAME, CATEGORY_ID FROM VENUES ORDER BY ID DESC LIMIT 2;"
}}}
:data
{
:rows
[[
100
"Mohawk Bend"
46
]
[
99
"Golden Road Brewing"
10
]]
:columns
[
"ID"
"NAME"
"CATEGORY_ID"
]
:cols
[{
:name
"ID"
,
:display_name
"ID"
,
:base_type
:type/Integer
}
{
:name
"NAME"
,
:display_name
"Name"
,
:base_type
:type/Text
}
{
:name
"CATEGORY_ID"
,
:display_name
"Category ID"
,
:base_type
:type/Integer
}]
:native_form
{
:query
"SELECT ID, NAME, CATEGORY_ID FROM VENUES ORDER BY ID DESC LIMIT 2;"
}}}
(
qp/process-query
{
:native
{
:query
"SELECT ID, NAME, CATEGORY_ID FROM VENUES ORDER BY ID DESC LIMIT 2;"
}
:type
:native
:database
(
id
)}))
...
...
This diff is collapsed.
Click to expand it.
test/metabase/query_processor/middleware/annotate_and_sort_test.clj
+
2
−
2
View file @
1fb60721
...
...
@@ -7,8 +7,8 @@
;; make sure that `infer-column-types` can still infer types even if the initial value(s) are `nil` (#4256)
(
expect
[{
:name
"a"
,
:base_type
:type/Integer
}
{
:name
"b"
,
:base_type
:type/Integer
}]
[{
:name
"a"
,
:display_name
"A"
,
:base_type
:type/Integer
}
{
:name
"b"
,
:display_name
"B"
,
:base_type
:type/Integer
}]
(
:cols
(
infer-column-types
{
:columns
[
:a
:b
]
,
:rows
[[
1
nil
]
[
2
nil
]
[
3
nil
]
...
...
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