Commit fe98e265 authored by Grégory Mantelet's avatar Grégory Mantelet
Browse files

[ADQL] Fix incomplete conflict resolution

parent a5ca82f3
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -645,25 +645,16 @@ public class TestADQLParser {
		for(ADQLVersion version : ADQLVersion.values()) {
			ADQLParser parser = new ADQLParser(version);

<<<<<<< HEAD
		// CASE: Invalid UDF name => ParseException
		final String[] functionsToTest = new String[]{ "_foo", "2do", "do!" };
		for(String fct : functionsToTest){
			try{
				parser.parseQuery("SELECT " + fct + "(p1,p2) FROM aTable");
				fail("A UDF name like \"" + fct + "\" is not allowed by the ADQL grammar. This query should not pass.");
=======
			// CASE: Valid UDF name => OK
			try {
				parser.parseQuery("SELECT foo(p1,p2) FROM aTable");
>>>>>>> [ADQL] 4 commits in one: 1/ new syntax of ORDER and GROUP BY, 2/ fix positions
			} catch(Throwable t) {
				t.printStackTrace();
				fail("Unexpected parsing error! This query should have passed. (see console for more details)");
			}

			// CASE: Invalid UDF name => ParseException
			final String[] functionsToTest = new String[]{ "_foo", "2do", "do!" };
			final String[] functionsToTest = new String[]{ "_foo", "2do", "do?" };
			for(String fct : functionsToTest) {
				try {
					parser.parseQuery("SELECT " + fct + "(p1,p2) FROM aTable");
+2 −3
Original line number Diff line number Diff line
package adql.translator;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

@@ -26,8 +25,8 @@ import adql.query.ADQLQuery;
import adql.query.ClauseADQL;
import adql.query.IdentifierField;
import adql.query.WithItem;
import adql.query.operand.ADQLColumn;
import adql.query.operand.ADQLOperand;
import adql.query.operand.NumericConstant;
import adql.query.operand.StringConstant;
import adql.query.operand.function.DefaultUDF;
import adql.query.operand.function.InUnitFunction;