From dd4f809d209c930ef02789ff8445df81641fb0c3 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Wed, 4 Nov 2015 21:18:28 -0600 Subject: [PATCH] HHH-6672 - Remove UNION support from 5.x grammars --- hibernate-core/src/main/antlr/hql.g | 7 +------ .../test/java/org/hibernate/test/hql/HqlParserTest.java | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/hibernate-core/src/main/antlr/hql.g b/hibernate-core/src/main/antlr/hql.g index c86afb55df..c4b72d0f69 100644 --- a/hibernate-core/src/main/antlr/hql.g +++ b/hibernate-core/src/main/antlr/hql.g @@ -74,7 +74,6 @@ tokens SOME="some"; SUM="sum"; TRUE="true"; - UNION="union"; UPDATE="update"; VERSIONED="versioned"; WHERE="where"; @@ -298,10 +297,6 @@ insertablePropertySpec } ; -union - : queryRule (UNION queryRule)* - ; - //## query: //## [selectClause] fromClause [whereClause] [groupByClause] [havingClause] [orderByClause]; @@ -805,7 +800,7 @@ compoundExpr ; subQuery - : union + : queryRule { #subQuery = #([QUERY,"query"], #subQuery); } ; diff --git a/hibernate-core/src/test/java/org/hibernate/test/hql/HqlParserTest.java b/hibernate-core/src/test/java/org/hibernate/test/hql/HqlParserTest.java index 82d2e0c774..abf18473f2 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/hql/HqlParserTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/hql/HqlParserTest.java @@ -33,13 +33,7 @@ import static org.junit.Assert.fail; * works properly (i.e. no unexpected syntax errors). * todo this should be a unit test. */ -public class HqlParserTest{ - - - @Test - public void testUnion() throws Exception { - parse("from Animal a where a in (from Cat union from Dog) "); - } +public class HqlParserTest { /** * Section 9.2 - from *