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
09e81ed7
Commit
09e81ed7
authored
9 years ago
by
gmantele
Browse files
Options
Downloads
Patches
Plain Diff
[ADQL] Return a not NULL name for a SelectItem containing a Concatenation
(indeed, a Concatenation object has no name).
parent
560c0b4d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/adql/query/SelectItem.java
+9
-3
9 additions, 3 deletions
src/adql/query/SelectItem.java
with
9 additions
and
3 deletions
src/adql/query/SelectItem.java
+
9
−
3
View file @
09e81ed7
...
...
@@ -16,13 +16,14 @@ package adql.query;
* You should have received a copy of the GNU Lesser General Public License
* along with ADQLLibrary. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2012-201
5
- UDS/Centre de Données astronomiques de Strasbourg (CDS),
* Copyright 2012-201
6
- UDS/Centre de Données astronomiques de Strasbourg (CDS),
* Astronomisches Rechen Institute (ARI)
*/
import
java.util.NoSuchElementException
;
import
adql.query.operand.ADQLOperand
;
import
adql.query.operand.Concatenation
;
/**
* <p>Represents an item of a SELECT clause.</p>
...
...
@@ -30,7 +31,7 @@ import adql.query.operand.ADQLOperand;
* <p>It merely encapsulates an operand and allows to associate to it an alias (according to the following syntax: "SELECT operand AS alias").</p>
*
* @author Grégory Mantelet (CDS;ARI)
* @version 1.4 (0
6
/201
5
)
* @version 1.4 (0
3
/201
6
)
*
* @see ClauseSelect
*/
...
...
@@ -185,7 +186,12 @@ public class SelectItem implements ADQLObject {
@Override
public
String
getName
(){
return
hasAlias
()
?
alias
:
operand
.
getName
();
if
(
hasAlias
())
return
alias
;
else
if
(
operand
instanceof
Concatenation
)
return
"concat"
;
else
return
operand
.
getName
();
}
@Override
...
...
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