@@ -68,6 +68,8 @@ public class RowManagerTest {
6868 private static RowStructure [] rowstructs = null ;
6969 private static RowSetPart [] datatypeStyles = null ;
7070
71+ private final static String VIEW_NAME = "musician_ml10" ;
72+
7173 @ SuppressWarnings ("unchecked" )
7274 @ BeforeAll
7375 public static void beforeClass () throws IOException , InterruptedException {
@@ -452,7 +454,7 @@ public void testView() {
452454 PlanBuilder p = rowMgr .newPlanBuilder ();
453455
454456 PlanBuilder .ExportablePlan builtPlan =
455- p .fromView ("opticUnitTest" , "musician" )
457+ p .fromView ("opticUnitTest" , VIEW_NAME )
456458 .where (
457459 p .cts .andQuery (
458460 p .cts .jsonPropertyWordQuery ("instrument" , "trumpet" ),
@@ -484,7 +486,7 @@ public void testSQL() {
484486 RowManager rowMgr = Common .client .newRowManager ();
485487 PlanBuilder p = rowMgr .newPlanBuilder ();
486488 PlanBuilder .ExportablePlan builtPlan =
487- p .fromSql ("select * from opticUnitTest.musician " );
489+ p .fromSql ("select * from opticUnitTest.musician_ml10 " );
488490 int rowNum = 0 ;
489491 String exception = "" ;
490492 try {
@@ -503,7 +505,7 @@ public void testSQL0Result() {
503505 RowManager rowMgr = Common .client .newRowManager ();
504506 PlanBuilder p = rowMgr .newPlanBuilder ();
505507 PlanBuilder .ExportablePlan builtPlan =
506- p .fromSql ("select * from opticUnitTest.musician where lastName = 'x'" );
508+ p .fromSql ("select * from opticUnitTest.musician_ml10 where lastName = 'x'" );
507509 int rowNum = 0 ;
508510 String exception = "" ;
509511 try {
@@ -564,7 +566,7 @@ public void testSearch() {
564566 PlanBuilder .ExportablePlan builtPlan =
565567 p .fromSearch (p .cts .jsonPropertyValueQuery ("instrument" , "trumpet" ))
566568 .joinInner (
567- p .fromView ("opticUnitTest" , "musician" , "" , viewDocId ),
569+ p .fromView ("opticUnitTest" , VIEW_NAME , "" , viewDocId ),
568570 p .on (p .fragmentIdCol ("fragmentId" ), viewDocId )
569571 )
570572 .orderBy (p .col ("lastName" ));
@@ -623,7 +625,7 @@ public void testJoinSrcDoc() throws IOException {
623625 PlanBuilder p = rowMgr .newPlanBuilder ();
624626
625627 PlanBuilder .ExportablePlan builtPlan =
626- p .fromView ("opticUnitTest" , "musician" , "" , p .fragmentIdCol ("musicianDocId" ))
628+ p .fromView ("opticUnitTest" , VIEW_NAME , "" , p .fragmentIdCol ("musicianDocId" ))
627629 .joinDoc (p .col ("musicianDoc" ), p .fragmentIdCol ("musicianDocId" ))
628630 .orderBy (p .col ("lastName" ))
629631 .select (
@@ -654,7 +656,7 @@ public void testJoinDocUri() throws IOException {
654656 PlanBuilder p = rowMgr .newPlanBuilder ();
655657
656658 PlanBuilder .ExportablePlan builtPlan =
657- p .fromView ("opticUnitTest" , "musician" , "" , p .fragmentIdCol ("musicianDocId" ))
659+ p .fromView ("opticUnitTest" , VIEW_NAME , "" , p .fragmentIdCol ("musicianDocId" ))
658660 .joinDocUri (p .col ("musicianDocUri" ), p .fragmentIdCol ("musicianDocId" ))
659661 .orderBy (p .col ("lastName" ))
660662 .select (p .col ("lastName" ), p .col ("firstName" ), p .col ("musicianDocUri" ))
@@ -1286,7 +1288,7 @@ public void testColumnInfo() {
12861288 RowManager rowMgr = Common .client .newRowManager ();
12871289 PlanBuilder p = rowMgr .newPlanBuilder ();
12881290 PlanBuilder .PreparePlan builtPlan =
1289- p .fromView ("opticUnitTest" , "musician" )
1291+ p .fromView ("opticUnitTest" , VIEW_NAME )
12901292 .where (
12911293 p .cts .andQuery (
12921294 p .cts .jsonPropertyWordQuery ("instrument" , "trumpet" ),
@@ -1296,10 +1298,10 @@ public void testColumnInfo() {
12961298 .orderBy (p .col ("lastName" ));
12971299
12981300 String [] expectedColumnInfos = new String []{
1299- "{\" schema\" :\" opticUnitTest\" , \" view\" :\" musician \" , \" column\" :\" lastName\" , \" type\" :\" string\" " ,
1300- "{\" schema\" :\" opticUnitTest\" , \" view\" :\" musician \" , \" column\" :\" firstName\" , \" type\" :\" string\" " ,
1301- "{\" schema\" :\" opticUnitTest\" , \" view\" :\" musician \" , \" column\" :\" dob\" , \" type\" :\" date\" " ,
1302- "{\" schema\" :\" opticUnitTest\" , \" view\" :\" musician \" , \" column\" :\" rowid\" , \" type\" :\" rowid\" "
1301+ "{\" schema\" :\" opticUnitTest\" , \" view\" :\" musician_ml10 \" , \" column\" :\" lastName\" , \" type\" :\" string\" " ,
1302+ "{\" schema\" :\" opticUnitTest\" , \" view\" :\" musician_ml10 \" , \" column\" :\" firstName\" , \" type\" :\" string\" " ,
1303+ "{\" schema\" :\" opticUnitTest\" , \" view\" :\" musician_ml10 \" , \" column\" :\" dob\" , \" type\" :\" date\" " ,
1304+ "{\" schema\" :\" opticUnitTest\" , \" view\" :\" musician_ml10 \" , \" column\" :\" rowid\" , \" type\" :\" rowid\" "
13031305 };
13041306
13051307 String stringHandleResult = rowMgr .columnInfo (builtPlan , new StringHandle ()).get ();
@@ -1317,7 +1319,7 @@ public void testGenerateView() throws IOException {
13171319 PlanBuilder p = rowMgr .newPlanBuilder ();
13181320
13191321 PlanBuilder .PreparePlan builtPlan =
1320- p .fromView ("opticUnitTest" , "musician" )
1322+ p .fromView ("opticUnitTest" , VIEW_NAME )
13211323 .where (
13221324 p .cts .andQuery (
13231325 p .cts .jsonPropertyWordQuery ("instrument" , "trumpet" ),
@@ -1363,7 +1365,7 @@ private DOMHandle initNamespaces(DOMHandle handle) {
13631365 @ Test
13641366 public void testRawSQL () throws IOException {
13651367 String plan = "SELECT *\n " +
1366- "FROM opticUnitTest.musician AS ''\n " +
1368+ "FROM opticUnitTest.musician_ml10 AS ''\n " +
13671369 "WHERE lastName IN ('Armstrong', 'Davis')" +
13681370 "ORDER BY lastName;\n " ;
13691371
@@ -1404,7 +1406,7 @@ public void testRawSPARQLSelect() throws IOException {
14041406 @ Test
14051407 public void testRawQueryDSL () throws IOException {
14061408 String plan =
1407- "op.fromView('opticUnitTest', 'musician ')\n " +
1409+ "op.fromView('opticUnitTest', 'musician_ml10 ')\n " +
14081410 " .where(cts.andQuery([\n " +
14091411 " cts.jsonPropertyWordQuery('instrument', 'trumpet'),\n " +
14101412 " cts.jsonPropertyWordQuery('lastName', ['Armstrong', 'Davis'])\n " +
@@ -1447,7 +1449,7 @@ public void testSampleBy() throws IOException {
14471449 PlanSampleByOptions options = p .sampleByOptions ().withLimit (2 );
14481450
14491451 PlanBuilder .ExportablePlan builtPlan =
1450- p .fromView ("opticUnitTest" , "musician" )
1452+ p .fromView ("opticUnitTest" , VIEW_NAME )
14511453 .sampleBy (options );
14521454
14531455 RowSet <RowRecord > rows = rowMgr .resultRows (builtPlan );
@@ -1461,7 +1463,7 @@ public void testSampleByNoArg() throws IOException {
14611463 PlanBuilder p = rowMgr .newPlanBuilder ();
14621464
14631465 PlanBuilder .ExportablePlan builtPlan =
1464- p .fromView ("opticUnitTest" , "musician" )
1466+ p .fromView ("opticUnitTest" , VIEW_NAME )
14651467 .sampleBy ();
14661468
14671469 RowSet <RowRecord > rows = rowMgr .resultRows (builtPlan );
0 commit comments