From 15f1d6fb848b9e6867327a25fdc6d3a1c64cce3c Mon Sep 17 00:00:00 2001 From: gmantele <gmantele@ari.uni-heidelberg.de> Date: Wed, 22 Apr 2015 14:51:44 +0200 Subject: [PATCH] [ADQL] Display properly unresolved functions --- .../exception/UnresolvedIdentifiersException.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/adql/db/exception/UnresolvedIdentifiersException.java b/src/adql/db/exception/UnresolvedIdentifiersException.java index 8c20187..ab38ec8 100644 --- a/src/adql/db/exception/UnresolvedIdentifiersException.java +++ b/src/adql/db/exception/UnresolvedIdentifiersException.java @@ -16,7 +16,8 @@ package adql.db.exception; * 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 - UDS/Centre de DonnĂ©es astronomiques de Strasbourg (CDS) + * Copyright 2012,2015 - UDS/Centre de DonnĂ©es astronomiques de Strasbourg (CDS), + * Astronomisches Rechen Institut (ARI) */ import java.util.ArrayList; @@ -36,8 +37,8 @@ import adql.parser.ParseException; * on this {@link UnresolvedIdentifiersException} (method {@link #iterator()}). * </p> * - * @author Grégory Mantelet (CDS) - * @version 06/2012 + * @author Grégory Mantelet (CDS;ARI) + * @version 1.3 (04/2015) * * @see DBChecker */ @@ -71,10 +72,10 @@ public class UnresolvedIdentifiersException extends ParseException implements It String tableName = ((UnresolvedTableException)pe).getTableName(); if (tableName != null && !tableName.trim().isEmpty()) addIdentifierName(tableName + " " + pe.getPosition()); - /*}else if (pe instanceof UnresolvedFunction){ // TODO MANAGE ALSO THE UNRESOLVED_FUNCTIONs! - String fctName = (((UnresolvedFunction)pe).getFunction() == null) ? null : ((UnresolvedFunction)pe).getFunction().getName(); - if (fctName != null && !fctName.trim().isEmpty()) - addIdentifierName(fctName + " " + pe.getPosition());*/ + }else if (pe instanceof UnresolvedFunction){ + String fctName = (((UnresolvedFunction)pe).getFunction() == null) ? null : ((UnresolvedFunction)pe).getFunction().getName() + "(...)"; + if (fctName != null && !fctName.trim().isEmpty()) + addIdentifierName(fctName /*+ " " + pe.getPosition()*/); // TODO Add the position of the function in the ADQL query! }else if (pe instanceof UnresolvedIdentifiersException) addIdentifierName(((UnresolvedIdentifiersException)pe).unresolvedIdentifiers); } -- GitLab