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
c05af01c
Commit
c05af01c
authored
Oct 28, 2020
by
Alex Pooley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed sql_set_operators feature flag
Union set operator now matches intersect and except set operators.
parent
e69eba78
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
37 deletions
+6
-37
app/models/concerns/from_union.rb
app/models/concerns/from_union.rb
+0
-21
changelogs/unreleased/273356-remove-sql_set_operators-feature-flag.yml
...released/273356-remove-sql_set_operators-feature-flag.yml
+5
-0
config/feature_flags/development/sql_set_operators.yml
config/feature_flags/development/sql_set_operators.yml
+0
-7
spec/models/concerns/from_union_spec.rb
spec/models/concerns/from_union_spec.rb
+1
-9
No files found.
app/models/concerns/from_union.rb
View file @
c05af01c
...
...
@@ -37,27 +37,6 @@ module FromUnion
# rubocop: disable Gitlab/Union
extend
FromSetOperator
define_set_operator
Gitlab
::
SQL
::
Union
alias_method
:from_union_set_operator
,
:from_union
def
from_union
(
members
,
remove_duplicates:
true
,
alias_as:
table_name
)
if
Feature
.
enabled?
(
:sql_set_operators
)
from_union_set_operator
(
members
,
remove_duplicates:
remove_duplicates
,
alias_as:
alias_as
)
else
# The original from_union method.
standard_from_union
(
members
,
remove_duplicates:
remove_duplicates
,
alias_as:
alias_as
)
end
end
private
def
standard_from_union
(
members
,
remove_duplicates:
true
,
alias_as:
table_name
)
union
=
Gitlab
::
SQL
::
Union
.
new
(
members
,
remove_duplicates:
remove_duplicates
)
.
to_sql
from
(
Arel
.
sql
(
"(
#{
union
}
)
#{
alias_as
}
"
))
end
# rubocop: enable Gitlab/Union
end
end
changelogs/unreleased/273356-remove-sql_set_operators-feature-flag.yml
0 → 100644
View file @
c05af01c
---
title
:
Enable refactored union set operator
merge_request
:
46295
author
:
type
:
added
config/feature_flags/development/sql_set_operators.yml
deleted
100644 → 0
View file @
e69eba78
---
name
:
sql_set_operators
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39786
rollout_issue_url
:
group
:
group::access
type
:
development
default_enabled
:
false
spec/models/concerns/from_union_spec.rb
View file @
c05af01c
...
...
@@ -3,13 +3,5 @@
require
'spec_helper'
RSpec
.
describe
FromUnion
do
[
true
,
false
].
each
do
|
sql_set_operator
|
context
"when sql-set-operators feature flag is
#{
sql_set_operator
}
"
do
before
do
stub_feature_flags
(
sql_set_operators:
sql_set_operator
)
end
it_behaves_like
'from set operator'
,
Gitlab
::
SQL
::
Union
end
end
it_behaves_like
'from set operator'
,
Gitlab
::
SQL
::
Union
end
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