diff --git a/src/adql/query/ADQLQuery.java b/src/adql/query/ADQLQuery.java
index 805b680357b5e8d1b7604c6c3d048b0961951f7b..dd0a9b9580967a229ad9ecd731f54b865ef02df5 100644
--- a/src/adql/query/ADQLQuery.java
+++ b/src/adql/query/ADQLQuery.java
@@ -16,7 +16,7 @@ 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-2016 - UDS/Centre de Données astronomiques de Strasbourg (CDS),
+ * Copyright 2012-2017 - UDS/Centre de Données astronomiques de Strasbourg (CDS),
  *                       Astronomisches Rechen Institut (ARI)
  */
 
@@ -35,6 +35,7 @@ import adql.query.operand.ADQLColumn;
 import adql.query.operand.ADQLOperand;
 import adql.query.operand.function.DefaultUDF;
 import adql.query.operand.function.geometry.BoxFunction;
+import adql.query.operand.function.geometry.CentroidFunction;
 import adql.query.operand.function.geometry.CircleFunction;
 import adql.query.operand.function.geometry.PointFunction;
 import adql.query.operand.function.geometry.PolygonFunction;
@@ -46,7 +47,7 @@ import adql.search.ISearchHandler;
  * <p>The resulting object of the {@link ADQLParser} is an object of this class.</p>
  * 
  * @author Gr&eacute;gory Mantelet (CDS;ARI)
- * @version 1.4 (03/2016)
+ * @version 1.4 (02/2017)
  */
 public class ADQLQuery implements ADQLObject {
 
@@ -321,7 +322,7 @@ public class ADQLQuery implements ADQLObject {
 			}else{
 				// Create the DBColumn:
 				DBColumn col = null;
-				// ...whose the name will be set with the SELECT item's alias: 
+				// ...whose the name will be set with the SELECT item's alias:
 				if (item.hasAlias()){
 					if (operand instanceof ADQLColumn && ((ADQLColumn)operand).getDBLink() != null){
 						col = ((ADQLColumn)operand).getDBLink();
@@ -333,11 +334,11 @@ public class ADQLQuery implements ADQLObject {
 				else{
 					if (operand instanceof ADQLColumn && ((ADQLColumn)operand).getDBLink() != null)
 						col = ((ADQLColumn)operand).getDBLink();
-					if (col == null)
+					else
 						col = new DefaultDBColumn(item.getName(), null);
 				}
 
-				/* For columns created by default (from functions and operations generally), 
+				/* For columns created by default (from functions and operations generally),
 				 * set the adequate type if known: */
 				// CASE: Well-defined UDF
 				if (operand instanceof DefaultUDF && ((DefaultUDF)operand).getDefinition() != null){
@@ -345,7 +346,7 @@ public class ADQLQuery implements ADQLObject {
 					((DefaultDBColumn)col).setDatatype(type);
 				}
 				// CASE: Point type:
-				else if (operand instanceof PointFunction)
+				else if (operand instanceof PointFunction || operand instanceof CentroidFunction)
 					((DefaultDBColumn)col).setDatatype(new DBType(DBDatatype.POINT));
 				// CASE: Region type:
 				else if (operand instanceof RegionFunction || operand instanceof CircleFunction || operand instanceof BoxFunction || operand instanceof PolygonFunction)
diff --git a/test/adql/TestADQLObjectPosition.java b/test/adql/query/TestADQLObjectPosition.java
similarity index 99%
rename from test/adql/TestADQLObjectPosition.java
rename to test/adql/query/TestADQLObjectPosition.java
index 7c1b8d41b741e2a9fa28b031f2a176b6757a715e..7a41bb29913aeca74dcd5dbee52052f85daeaf2e 100644
--- a/test/adql/TestADQLObjectPosition.java
+++ b/test/adql/query/TestADQLObjectPosition.java
@@ -1,4 +1,4 @@
-package adql;
+package adql.query;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
diff --git a/test/adql/TestADQLQuery.java b/test/adql/query/TestADQLQuery.java
similarity index 95%
rename from test/adql/TestADQLQuery.java
rename to test/adql/query/TestADQLQuery.java
index 1ea715bab9aedca36e4e059be66c57cb7c552af0..272622eeabd80a4b59c91e269f61c7b830bd870c 100644
--- a/test/adql/TestADQLQuery.java
+++ b/test/adql/query/TestADQLQuery.java
@@ -1,4 +1,4 @@
-package adql;
+package adql.query;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -14,13 +14,6 @@ import org.junit.Test;
 import adql.db.DBType;
 import adql.db.DBType.DBDatatype;
 import adql.db.FunctionDef;
-import adql.query.ADQLObject;
-import adql.query.ADQLOrder;
-import adql.query.ADQLQuery;
-import adql.query.ClauseADQL;
-import adql.query.ClauseConstraints;
-import adql.query.ClauseSelect;
-import adql.query.SelectItem;
 import adql.query.constraint.Comparison;
 import adql.query.constraint.ComparisonOperator;
 import adql.query.constraint.ConstraintsGroup;
@@ -39,7 +32,10 @@ import adql.query.operand.function.MathFunctionType;
 import adql.query.operand.function.SQLFunction;
 import adql.query.operand.function.SQLFunctionType;
 import adql.query.operand.function.geometry.BoxFunction;
+import adql.query.operand.function.geometry.CentroidFunction;
 import adql.query.operand.function.geometry.CircleFunction;
+import adql.query.operand.function.geometry.GeometryFunction;
+import adql.query.operand.function.geometry.GeometryFunction.GeometryValue;
 import adql.query.operand.function.geometry.PointFunction;
 import adql.query.operand.function.geometry.PolygonFunction;
 import adql.query.operand.function.geometry.RegionFunction;
@@ -195,8 +191,10 @@ public class TestADQLQuery {
 		try{
 			select.clear();
 			select.add(new PointFunction(new StringConstant(""), new ADQLColumn("ra"), new ADQLColumn("dec")));
-			assertEquals(1, query.getResultingColumns().length);
-			assertEquals(DBDatatype.POINT, query.getResultingColumns()[0].getDatatype().type);
+			select.add(new CentroidFunction(new GeometryValue<GeometryFunction>(new ADQLColumn("aRegion"))));
+			assertEquals(2, query.getResultingColumns().length);
+			for(int i = 0; i < 2; i++)
+				assertEquals(DBDatatype.POINT, query.getResultingColumns()[i].getDatatype().type);
 		}catch(Exception ex){
 			ex.printStackTrace();
 			fail("The POINT function is well defined. This error should have occurred.");
diff --git a/test/adql/TestIdentifierField.java b/test/adql/query/TestIdentifierField.java
similarity index 96%
rename from test/adql/TestIdentifierField.java
rename to test/adql/query/TestIdentifierField.java
index c4c5fc2dc99d3d79927e0f2a6e488753a0f1004b..2885d1052af242923b6dd054bb9fb905111ab57f 100644
--- a/test/adql/TestIdentifierField.java
+++ b/test/adql/query/TestIdentifierField.java
@@ -1,4 +1,4 @@
-package adql;
+package adql.query;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
diff --git a/test/adql/TestIN.java b/test/adql/query/constraint/TestIN.java
similarity index 99%
rename from test/adql/TestIN.java
rename to test/adql/query/constraint/TestIN.java
index d3ad2f2241ff9544aa287aa333d21053623ce294..ab385dbf0840dc3be68ac02acbf25a1e32dbeec3 100644
--- a/test/adql/TestIN.java
+++ b/test/adql/query/constraint/TestIN.java
@@ -1,4 +1,4 @@
-package adql;
+package adql.query.constraint;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;