Author: shawkins
Date: 2010-04-07 10:57:01 -0400 (Wed, 07 Apr 2010)
New Revision: 2032
Modified:
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestJoinOptimization.java
trunk/engine/src/test/java/com/metamatrix/query/parser/TestOptionsAndHints.java
trunk/engine/src/test/java/com/metamatrix/query/parser/TestParser.java
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcedureRelational.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
Log:
TEIID-908 TEIID-1040 refining the plannode logic and moving option debug, showplan, and
planonly to be set commands
Modified:
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestJoinOptimization.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestJoinOptimization.java 2010-04-07
03:29:59 UTC (rev 2031)
+++
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestJoinOptimization.java 2010-04-07
14:57:01 UTC (rev 2032)
@@ -136,7 +136,7 @@
}
@Test public void testOuterJoinPushNonJoinCriteria_Case5547() {
- String sql = "select bqt1.smalla.intkey from bqt1.smalla left outer join
bqt2.smalla on (1=1) option debug"; //$NON-NLS-1$
+ String sql = "select bqt1.smalla.intkey from bqt1.smalla left outer join
bqt2.smalla on (1=1)"; //$NON-NLS-1$
String BQT1 = "BQT1"; //$NON-NLS-1$
String BQT2 = "BQT2"; //$NON-NLS-1$
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
Modified: trunk/engine/src/test/java/com/metamatrix/query/parser/TestOptionsAndHints.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/query/parser/TestOptionsAndHints.java 2010-04-07
03:29:59 UTC (rev 2031)
+++
trunk/engine/src/test/java/com/metamatrix/query/parser/TestOptionsAndHints.java 2010-04-07
14:57:01 UTC (rev 2032)
@@ -203,11 +203,10 @@
query);
}
- @Test public void testOptionMakedepBankOfAmerica() throws Exception {
+ @Test public void testOptionMakedep() throws Exception {
String sql = "SELECT A.alert_id " + //$NON-NLS-1$
"FROM (FSK_ALERT AS A MAKEDEP INNER JOIN Core.FSC_PARTY_DIM AS C ON
A.primary_entity_key = C.PARTY_KEY) " +//$NON-NLS-1$
- "LEFT OUTER JOIN FSK_SCENARIO AS S ON A.scenario_id = S.scenario_id
" +//$NON-NLS-1$
- "OPTION PLANONLY DEBUG"; //$NON-NLS-1$
+ "LEFT OUTER JOIN FSK_SCENARIO AS S ON A.scenario_id = S.scenario_id
";//$NON-NLS-1$
Query command = (Query)new QueryParser().parseCommand(sql);
JoinPredicate predicate = (JoinPredicate)command.getFrom().getClauses().get(0);
assertTrue(((JoinPredicate)predicate.getLeftClause()).getLeftClause().isMakeDep());
Modified: trunk/engine/src/test/java/com/metamatrix/query/parser/TestParser.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/parser/TestParser.java 2010-04-07
03:29:59 UTC (rev 2031)
+++ trunk/engine/src/test/java/com/metamatrix/query/parser/TestParser.java 2010-04-07
14:57:01 UTC (rev 2032)
@@ -6135,19 +6135,19 @@
}
@Test public void testCompoundNonJoinCriteria_defect15167_1() throws Exception {
- QueryParser.getQueryParser().parseCommand("SELECT A.alert_id,
A.primary_entity_name, A.primary_entity_level_code, A.alert_description, A.create_date,
A.alert_risk_score, S.scenario_name, A.alert_status_code, A.process_id,
A.actual_values_text, S.SCENARIO_CATEGORY_DESC, A.primary_entity_number, A.scenario_id,
A.primary_entity_key FROM (FSK_ALERT AS A LEFT OUTER JOIN FSK_SCENARIO AS S ON
A.scenario_id = S.scenario_id) INNER JOIN FSC_ACCOUNT_DIM AS C ON A.primary_entity_key =
C.ACCOUNT_KEY AND ((S.current_ind = 'Y') OR (S.current_ind IS NULL)) WHERE
(A.primary_entity_level_code = 'ACC') AND (C.ACCOUNT_KEY = 23923) AND
(A.logical_delete_ind = 'N') OPTION PLANONLY"); //$NON-NLS-1$
+ QueryParser.getQueryParser().parseCommand("SELECT A.alert_id,
A.primary_entity_name, A.primary_entity_level_code, A.alert_description, A.create_date,
A.alert_risk_score, S.scenario_name, A.alert_status_code, A.process_id,
A.actual_values_text, S.SCENARIO_CATEGORY_DESC, A.primary_entity_number, A.scenario_id,
A.primary_entity_key FROM (FSK_ALERT AS A LEFT OUTER JOIN FSK_SCENARIO AS S ON
A.scenario_id = S.scenario_id) INNER JOIN FSC_ACCOUNT_DIM AS C ON A.primary_entity_key =
C.ACCOUNT_KEY AND ((S.current_ind = 'Y') OR (S.current_ind IS NULL)) WHERE
(A.primary_entity_level_code = 'ACC') AND (C.ACCOUNT_KEY = 23923) AND
(A.logical_delete_ind = 'N')"); //$NON-NLS-1$
}
@Test public void testCompoundNonJoinCriteria_defect15167_2() throws Exception {
- QueryParser.getQueryParser().parseCommand("SELECT A.alert_id,
A.primary_entity_name, A.primary_entity_level_code, A.alert_description, A.create_date,
A.alert_risk_score, S.scenario_name, A.alert_status_code, A.process_id,
A.actual_values_text, S.SCENARIO_CATEGORY_DESC, A.primary_entity_number, A.scenario_id,
A.primary_entity_key FROM (FSK_ALERT AS A LEFT OUTER JOIN FSK_SCENARIO AS S ON
A.scenario_id = S.scenario_id) INNER JOIN FSC_ACCOUNT_DIM AS C ON A.primary_entity_key =
C.ACCOUNT_KEY AND (S.current_ind = 'Y' OR S.current_ind IS NULL) WHERE
(A.primary_entity_level_code = 'ACC') AND (C.ACCOUNT_KEY = 23923) AND
(A.logical_delete_ind = 'N') OPTION PLANONLY"); //$NON-NLS-1$
+ QueryParser.getQueryParser().parseCommand("SELECT A.alert_id,
A.primary_entity_name, A.primary_entity_level_code, A.alert_description, A.create_date,
A.alert_risk_score, S.scenario_name, A.alert_status_code, A.process_id,
A.actual_values_text, S.SCENARIO_CATEGORY_DESC, A.primary_entity_number, A.scenario_id,
A.primary_entity_key FROM (FSK_ALERT AS A LEFT OUTER JOIN FSK_SCENARIO AS S ON
A.scenario_id = S.scenario_id) INNER JOIN FSC_ACCOUNT_DIM AS C ON A.primary_entity_key =
C.ACCOUNT_KEY AND (S.current_ind = 'Y' OR S.current_ind IS NULL) WHERE
(A.primary_entity_level_code = 'ACC') AND (C.ACCOUNT_KEY = 23923) AND
(A.logical_delete_ind = 'N')"); //$NON-NLS-1$
}
@Test public void testCompoundNonJoinCriteria_defect15167_3() throws Exception {
- QueryParser.getQueryParser().parseCommand("SELECT A.alert_id,
A.primary_entity_name, A.primary_entity_level_code, A.alert_description, A.create_date,
A.alert_risk_score, S.scenario_name, A.alert_status_code, A.process_id,
A.actual_values_text, S.SCENARIO_CATEGORY_DESC, A.primary_entity_number, A.scenario_id,
A.primary_entity_key FROM (FSK_ALERT AS A LEFT OUTER JOIN FSK_SCENARIO AS S ON
A.scenario_id = S.scenario_id) INNER JOIN FSC_ACCOUNT_DIM AS C ON (A.primary_entity_key =
C.ACCOUNT_KEY AND (S.current_ind = 'Y' OR S.current_ind IS NULL)) WHERE
(A.primary_entity_level_code = 'ACC') AND (C.ACCOUNT_KEY = 23923) AND
(A.logical_delete_ind = 'N') OPTION PLANONLY"); //$NON-NLS-1$
+ QueryParser.getQueryParser().parseCommand("SELECT A.alert_id,
A.primary_entity_name, A.primary_entity_level_code, A.alert_description, A.create_date,
A.alert_risk_score, S.scenario_name, A.alert_status_code, A.process_id,
A.actual_values_text, S.SCENARIO_CATEGORY_DESC, A.primary_entity_number, A.scenario_id,
A.primary_entity_key FROM (FSK_ALERT AS A LEFT OUTER JOIN FSK_SCENARIO AS S ON
A.scenario_id = S.scenario_id) INNER JOIN FSC_ACCOUNT_DIM AS C ON (A.primary_entity_key =
C.ACCOUNT_KEY AND (S.current_ind = 'Y' OR S.current_ind IS NULL)) WHERE
(A.primary_entity_level_code = 'ACC') AND (C.ACCOUNT_KEY = 23923) AND
(A.logical_delete_ind = 'N')"); //$NON-NLS-1$
}
@Test public void testCompoundNonJoinCriteria_defect15167_4() throws Exception {
- QueryParser.getQueryParser().parseCommand("SELECT A.alert_id,
A.primary_entity_name, A.primary_entity_level_code, A.alert_description, A.create_date,
A.alert_risk_score, S.scenario_name, A.alert_status_code, A.process_id,
A.actual_values_text, S.SCENARIO_CATEGORY_DESC, A.primary_entity_number, A.scenario_id,
A.primary_entity_key FROM (FSK_ALERT AS A LEFT OUTER JOIN FSK_SCENARIO AS S ON
A.scenario_id = S.scenario_id) INNER JOIN FSC_ACCOUNT_DIM AS C ON (A.primary_entity_key =
C.ACCOUNT_KEY AND S.current_ind = 'Y' OR S.current_ind IS NULL) WHERE
(A.primary_entity_level_code = 'ACC') AND (C.ACCOUNT_KEY = 23923) AND
(A.logical_delete_ind = 'N') OPTION PLANONLY"); //$NON-NLS-1$
+ QueryParser.getQueryParser().parseCommand("SELECT A.alert_id,
A.primary_entity_name, A.primary_entity_level_code, A.alert_description, A.create_date,
A.alert_risk_score, S.scenario_name, A.alert_status_code, A.process_id,
A.actual_values_text, S.SCENARIO_CATEGORY_DESC, A.primary_entity_number, A.scenario_id,
A.primary_entity_key FROM (FSK_ALERT AS A LEFT OUTER JOIN FSK_SCENARIO AS S ON
A.scenario_id = S.scenario_id) INNER JOIN FSC_ACCOUNT_DIM AS C ON (A.primary_entity_key =
C.ACCOUNT_KEY AND S.current_ind = 'Y' OR S.current_ind IS NULL) WHERE
(A.primary_entity_level_code = 'ACC') AND (C.ACCOUNT_KEY = 23923) AND
(A.logical_delete_ind = 'N')"); //$NON-NLS-1$
}
@Test public void testFunctionInGroupBy() throws Exception {
Modified:
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcedureRelational.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcedureRelational.java 2010-04-07
03:29:59 UTC (rev 2031)
+++
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcedureRelational.java 2010-04-07
14:57:01 UTC (rev 2032)
@@ -548,7 +548,7 @@
//virtual group with procedure in transformation
@Test public void testCase6395ProcAsVirtualGroup9(){
- String sql = "SELECT P.e2 as ve3, P.e1 as ve4 FROM pm1.vsp47 as P where
param1=1 and param2='a' OPTION DEBUG"; //$NON-NLS-1$
+ String sql = "SELECT P.e2 as ve3, P.e1 as ve4 FROM pm1.vsp47 as P where
param1=1 and param2='a'"; //$NON-NLS-1$
// Create expected results
List[] expected = new List[] {
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2010-04-07
03:29:59 UTC (rev 2031)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2010-04-07
14:57:01 UTC (rev 2032)
@@ -155,11 +155,6 @@
helpExecute(sql, "a", 1, true); //$NON-NLS-1$
}
- @Test public void testPlanOnly() throws Exception {
- String sql = "SELECT * FROM BQT1.SmallA option planonly"; //$NON-NLS-1$
- helpExecute(sql,"a"); //$NON-NLS-1$
- }
-
/**
* Tests whether an exception result is sent when an exception occurs
* @since 4.3