Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vollt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sonia Zorba
vollt
Commits
97a99e41
Commit
97a99e41
authored
5 years ago
by
Grégory Mantelet
Browse files
Options
Downloads
Patches
Plain Diff
[ADQL] `FeatureSet.unsupportAll()` must un-support all supported features
instead of ONLY those listed in `availableFeatures`.
parent
ade12662
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/adql/parser/feature/FeatureSet.java
+8
-8
8 additions, 8 deletions
src/adql/parser/feature/FeatureSet.java
test/adql/parser/feature/TestFeatureSet.java
+10
-4
10 additions, 4 deletions
test/adql/parser/feature/TestFeatureSet.java
with
18 additions
and
12 deletions
src/adql/parser/feature/FeatureSet.java
+
8
−
8
View file @
97a99e41
...
@@ -427,8 +427,8 @@ public class FeatureSet implements Iterable<LanguageFeature> {
...
@@ -427,8 +427,8 @@ public class FeatureSet implements Iterable<LanguageFeature> {
* @see #getAvailableFeatures()
* @see #getAvailableFeatures()
*/
*/
public
final
void
unsupportAll
()
{
public
final
void
unsupportAll
()
{
// unsupport all
available features
:
// unsupport all
features currently supported
:
for
(
LanguageFeature
feature
:
availableFeature
s
)
for
(
LanguageFeature
feature
:
thi
s
)
unsupport
(
feature
);
unsupport
(
feature
);
// also unsupport any UDF:
// also unsupport any UDF:
...
...
This diff is collapsed.
Click to expand it.
test/adql/parser/feature/TestFeatureSet.java
+
10
−
4
View file @
97a99e41
...
@@ -215,11 +215,17 @@ public class TestFeatureSet {
...
@@ -215,11 +215,17 @@ public class TestFeatureSet {
public
void
testUnsupportAll
()
{
public
void
testUnsupportAll
()
{
FeatureSet
set
=
new
FeatureSet
(
true
);
FeatureSet
set
=
new
FeatureSet
(
true
);
/* here is a custom Language Feature (i.e. not part of the
* availableFeatures list): */
set
.
support
(
new
LanguageFeature
(
LanguageFeature
.
TYPE_UDF
,
"foo(VARCHAR) -> BOOLEAN"
,
true
));
// unsupport all currently supported features:
set
.
unsupportAll
();
set
.
unsupportAll
();
for
(
LanguageFeature
feat
:
FeatureSet
.
availableFeatures
)
{
assertNotNull
(
feat
);
// ensure the list of supported features is really empty:
assertFalse
(
set
.
supportedFeatures
.
containsKey
(
feat
.
type
));
assertEquals
(
0
,
set
.
supportedFeatures
.
size
());
}
// ...and that no non-declared UDF is allowed:
assertFalse
(
set
.
isAnyUdfAllowed
());
assertFalse
(
set
.
isAnyUdfAllowed
());
}
}
...
...
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