Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
dce7d12b
Commit
dce7d12b
authored
Apr 20, 2021
by
rossfuhrman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix segment spelling
parent
afda2f2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/gitlab/utils/usage_data.rb
lib/gitlab/utils/usage_data.rb
+1
-1
spec/support/shared_examples/lib/gitlab/sql/set_operator_shared_examples.rb
...d_examples/lib/gitlab/sql/set_operator_shared_examples.rb
+1
-1
No files found.
lib/gitlab/utils/usage_data.rb
View file @
dce7d12b
...
@@ -121,7 +121,7 @@ module Gitlab
...
@@ -121,7 +121,7 @@ module Gitlab
count_grouped
=
relation
.
group
(
column
).
select
(
Arel
.
star
.
count
.
as
(
'count_grouped'
))
count_grouped
=
relation
.
group
(
column
).
select
(
Arel
.
star
.
count
.
as
(
'count_grouped'
))
cte
=
Gitlab
::
SQL
::
CTE
.
new
(
:count_cte
,
count_grouped
)
cte
=
Gitlab
::
SQL
::
CTE
.
new
(
:count_cte
,
count_grouped
)
# For example, 9 seg
e
ments gives 10 buckets
# For example, 9 segments gives 10 buckets
bucket_segments
=
bucket_size
-
1
bucket_segments
=
bucket_size
-
1
width_bucket
=
Arel
::
Nodes
::
NamedFunction
width_bucket
=
Arel
::
Nodes
::
NamedFunction
...
...
spec/support/shared_examples/lib/gitlab/sql/set_operator_shared_examples.rb
View file @
dce7d12b
...
@@ -21,7 +21,7 @@ RSpec.shared_examples 'SQL set operator' do |operator_keyword|
...
@@ -21,7 +21,7 @@ RSpec.shared_examples 'SQL set operator' do |operator_keyword|
expect
(
set_operator
.
to_sql
).
to
eq
(
"(
#{
to_sql
(
relation_1
)
}
)
\n
#{
operator_keyword
}
\n
(
#{
to_sql
(
relation_2
)
}
)"
)
expect
(
set_operator
.
to_sql
).
to
eq
(
"(
#{
to_sql
(
relation_1
)
}
)
\n
#{
operator_keyword
}
\n
(
#{
to_sql
(
relation_2
)
}
)"
)
end
end
it
'skips Model.none seg
e
ments'
do
it
'skips Model.none segments'
do
empty_relation
=
User
.
none
empty_relation
=
User
.
none
set_operator
=
described_class
.
new
([
empty_relation
,
relation_1
,
relation_2
])
set_operator
=
described_class
.
new
([
empty_relation
,
relation_1
,
relation_2
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment