Skip to content
Snippets Groups Projects
Commit fbe3cfdd authored by gmantele's avatar gmantele
Browse files

ADQL: Fix big bug: no parenthesis in the SQL translation for ADQL constraints...

ADQL: Fix big bug: no parenthesis in the SQL translation for ADQL constraints with parenthesis ( ex: A AND (B OR C)) )
parent 612ab4fe
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@ import adql.query.SelectItem;
import adql.query.constraint.ADQLConstraint;
import adql.query.constraint.Between;
import adql.query.constraint.Comparison;
import adql.query.constraint.ConstraintsGroup;
import adql.query.constraint.Exists;
import adql.query.constraint.In;
import adql.query.constraint.IsNull;
......@@ -83,7 +84,7 @@ import adql.query.operand.function.geometry.RegionFunction;
* An extension is already available for PgSphere: {@link PgSphereTranslator}.</b></p>
*
* @author Gr&eacute;gory Mantelet (CDS;ARI)
* @version 1.2 (11/2013)
* @version 1.2 (03/2014)
*
* @see PgSphereTranslator
*/
......@@ -277,7 +278,10 @@ public class PostgreSQLTranslator implements ADQLTranslator {
@Override
public String translate(ClauseConstraints clause) throws TranslationException{
return getDefaultADQLList(clause);
if (clause instanceof ConstraintsGroup)
return "(" + getDefaultADQLList(clause) + ")";
else
return getDefaultADQLList(clause);
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment