Commit 0eb4445d authored by vforchi's avatar vforchi
Browse files

Merge remote-tracking branch 'upstream/master'

parents 16752294 bae21b07
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ package adql.db;
 * 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 2014 - Astronomisches Rechen Institut (ARI)
 * Copyright 2014-2017 - Astronomisches Rechen Institut (ARI)
 */

import java.util.ArrayList;
@@ -78,7 +78,7 @@ import adql.query.operand.function.geometry.RegionFunction;
 * </i></p>
 * 
 * @author Gr&eacute;gory Mantelet (ARI)
 * @version 1.3 (12/2014)
 * @version 1.4 (04/2017)
 * @since 1.3
 */
public final class STCS {
@@ -143,11 +143,11 @@ public final class STCS {
	 * </i></p>
	 * 
	 * @author Gr&eacute;gory Mantelet (ARI)
	 * @version 1.3 (10/2014)
	 * @version 1.4 (04/2017)
	 * @since 1.3
	 */
	public static enum Frame{
		ECLIPTIC, FK4, FK5, GALACTIC, ICRS, UNKNOWNFRAME;
		ECLIPTIC, FK4, FK5, J2000, GALACTIC, ICRS, UNKNOWNFRAME;

		/** Default value for a frame: {@link #UNKNOWNFRAME}. */
		public static final Frame DEFAULT = UNKNOWNFRAME;
+5 −19
Original line number Diff line number Diff line
/* ADQLParser.java */
/* Generated By:JavaCC: Do not edit this line. ADQLParser.java
 * 
 * Modified by Gregory Mantelet (ARI), March 2017
 * Modification: line 5686, from:
 * 
 *   public ADQLParser(java.io.InputStream stream){
 *     this(stream, null);
 *   }
 * 
 *   to:
 * 
 *   public ADQLParser(java.io.InputStream stream){
 *     this(stream, (String)null);
 *   }
 */
/* Generated By:JavaCC: Do not edit this line. ADQLParser.java */
package adql.parser;

import java.io.FileReader;
@@ -82,7 +68,7 @@ import adql.translator.TranslationException;
* @see ADQLQueryFactory
*
* @author Gr&eacute;gory Mantelet (CDS;ARI) - gmantele@ari.uni-heidelberg.de
* @version 1.4 (03/2017)
* @version 1.4 (04/2017)
*/
public class ADQLParser implements ADQLParserConstants {

@@ -1110,12 +1096,12 @@ public class ADQLParser implements ADQLParserConstants {
	final public ColumnReference ColumnRef() throws ParseException{
		trace_call("ColumnRef");
		try{
			IdentifierItem identifier = null;
			identifier = Identifier();
			IdentifierItems identifiers = null;
			identifiers = ColumnName();
			try{
				{
					if ("" != null)
						return queryFactory.createColRef(identifier);
						return queryFactory.createColRef(identifiers);
				}
			}catch(Exception ex){
				{
+2 −6
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ package adql.parser;
 * 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-2015 - 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)
 */

@@ -83,7 +83,7 @@ import adql.query.operand.function.geometry.RegionFunction;
 * <p>To customize the object representation you merely have to extends the appropriate functions of this class.</p>
 * 
 * @author Gr&eacute;gory Mantelet (CDS;ARI)
 * @version 1.4 (08/2015)
 * @version 1.4 (04/2017)
 * 
 * @see ADQLParser
 */
@@ -430,10 +430,6 @@ public class ADQLQueryFactory {
		return colRef;
	}

	/**
	 * @deprecated since 1.4 ; Former version's mistake: a GROUP BY item is either a regular/delimited column name or an integer, not a qualified column name ; Replaced by {@link #createColRef(adql.parser.IdentifierItems.IdentifierItem)} ; This function is no longer used by ADQLParser.
	 */
	@Deprecated
	public ColumnReference createColRef(final IdentifierItems idItems) throws Exception{
		ColumnReference colRef = new ColumnReference(idItems.join("."));
		if (colRef != null){
+5 −5
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
*  If the syntax is not conform to the ADQL definition an error message is printed else it will be the message "Correct syntax".
*
*  Author:  Gr&eacute;gory Mantelet (CDS;ARI) - gmantele@ari.uni-heidelberg.de
*  Version: 1.4 (03/2017)
*  Version: 1.4 (04/2017)
*/

							/* ########### */
@@ -89,7 +89,7 @@ import adql.translator.TranslationException;
* @see ADQLQueryFactory
*
* @author Gr&eacute;gory Mantelet (CDS;ARI) - gmantele@ari.uni-heidelberg.de
* @version 1.4 (03/2017)
* @version 1.4 (04/2017)
*/
public class ADQLParser {
	
@@ -916,11 +916,11 @@ ADQLColumn Column(): {IdentifierItems identifiers;} {
	}
}

ColumnReference ColumnRef(): {IdentifierItem identifier = null;}{
	identifier=Identifier()
ColumnReference ColumnRef(): {IdentifierItems identifiers = null;}{
	identifiers=ColumnName()
	{
		try{
			return queryFactory.createColRef(identifier);
			return queryFactory.createColRef(identifiers);
		}catch(Exception ex){
			throw generateParseException(ex);
		}
+9 −0
Original line number Diff line number Diff line
@@ -257,6 +257,15 @@ public class TestFunctionDef {
			ex.printStackTrace(System.err);
			fail("Unknown types MUST be allowed!");
		}
		try{
			FunctionDef fct = FunctionDef.parse("INTERSECTION(region1 region, region2 region) -> region");
			assertEquals(DBType.DBDatatype.REGION, fct.getParam(0).type.type);
			assertEquals(DBType.DBDatatype.REGION, fct.getParam(1).type.type);
			assertEquals(DBType.DBDatatype.REGION, fct.returnType.type);
		}catch(Exception ex){
			ex.printStackTrace(System.err);
			fail("Impossible to parse this REGION based FunctionDef! (see console for more details)");
		}
	}

	@Test
Loading