@@ -68,6 +68,8 @@ public class RowManagerTest {
68
68
private static RowStructure [] rowstructs = null ;
69
69
private static RowSetPart [] datatypeStyles = null ;
70
70
71
+ private final static String VIEW_NAME = "musician_ml10" ;
72
+
71
73
@ SuppressWarnings ("unchecked" )
72
74
@ BeforeAll
73
75
public static void beforeClass () throws IOException , InterruptedException {
@@ -452,7 +454,7 @@ public void testView() {
452
454
PlanBuilder p = rowMgr .newPlanBuilder ();
453
455
454
456
PlanBuilder .ExportablePlan builtPlan =
455
- p .fromView ("opticUnitTest" , "musician" )
457
+ p .fromView ("opticUnitTest" , VIEW_NAME )
456
458
.where (
457
459
p .cts .andQuery (
458
460
p .cts .jsonPropertyWordQuery ("instrument" , "trumpet" ),
@@ -484,7 +486,7 @@ public void testSQL() {
484
486
RowManager rowMgr = Common .client .newRowManager ();
485
487
PlanBuilder p = rowMgr .newPlanBuilder ();
486
488
PlanBuilder .ExportablePlan builtPlan =
487
- p .fromSql ("select * from opticUnitTest.musician " );
489
+ p .fromSql ("select * from opticUnitTest.musician_ml10 " );
488
490
int rowNum = 0 ;
489
491
String exception = "" ;
490
492
try {
@@ -503,7 +505,7 @@ public void testSQL0Result() {
503
505
RowManager rowMgr = Common .client .newRowManager ();
504
506
PlanBuilder p = rowMgr .newPlanBuilder ();
505
507
PlanBuilder .ExportablePlan builtPlan =
506
- p .fromSql ("select * from opticUnitTest.musician where lastName = 'x'" );
508
+ p .fromSql ("select * from opticUnitTest.musician_ml10 where lastName = 'x'" );
507
509
int rowNum = 0 ;
508
510
String exception = "" ;
509
511
try {
@@ -564,7 +566,7 @@ public void testSearch() {
564
566
PlanBuilder .ExportablePlan builtPlan =
565
567
p .fromSearch (p .cts .jsonPropertyValueQuery ("instrument" , "trumpet" ))
566
568
.joinInner (
567
- p .fromView ("opticUnitTest" , "musician" , "" , viewDocId ),
569
+ p .fromView ("opticUnitTest" , VIEW_NAME , "" , viewDocId ),
568
570
p .on (p .fragmentIdCol ("fragmentId" ), viewDocId )
569
571
)
570
572
.orderBy (p .col ("lastName" ));
@@ -623,7 +625,7 @@ public void testJoinSrcDoc() throws IOException {
623
625
PlanBuilder p = rowMgr .newPlanBuilder ();
624
626
625
627
PlanBuilder .ExportablePlan builtPlan =
626
- p .fromView ("opticUnitTest" , "musician" , "" , p .fragmentIdCol ("musicianDocId" ))
628
+ p .fromView ("opticUnitTest" , VIEW_NAME , "" , p .fragmentIdCol ("musicianDocId" ))
627
629
.joinDoc (p .col ("musicianDoc" ), p .fragmentIdCol ("musicianDocId" ))
628
630
.orderBy (p .col ("lastName" ))
629
631
.select (
@@ -654,7 +656,7 @@ public void testJoinDocUri() throws IOException {
654
656
PlanBuilder p = rowMgr .newPlanBuilder ();
655
657
656
658
PlanBuilder .ExportablePlan builtPlan =
657
- p .fromView ("opticUnitTest" , "musician" , "" , p .fragmentIdCol ("musicianDocId" ))
659
+ p .fromView ("opticUnitTest" , VIEW_NAME , "" , p .fragmentIdCol ("musicianDocId" ))
658
660
.joinDocUri (p .col ("musicianDocUri" ), p .fragmentIdCol ("musicianDocId" ))
659
661
.orderBy (p .col ("lastName" ))
660
662
.select (p .col ("lastName" ), p .col ("firstName" ), p .col ("musicianDocUri" ))
@@ -1286,7 +1288,7 @@ public void testColumnInfo() {
1286
1288
RowManager rowMgr = Common .client .newRowManager ();
1287
1289
PlanBuilder p = rowMgr .newPlanBuilder ();
1288
1290
PlanBuilder .PreparePlan builtPlan =
1289
- p .fromView ("opticUnitTest" , "musician" )
1291
+ p .fromView ("opticUnitTest" , VIEW_NAME )
1290
1292
.where (
1291
1293
p .cts .andQuery (
1292
1294
p .cts .jsonPropertyWordQuery ("instrument" , "trumpet" ),
@@ -1296,10 +1298,10 @@ public void testColumnInfo() {
1296
1298
.orderBy (p .col ("lastName" ));
1297
1299
1298
1300
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\" "
1303
1305
};
1304
1306
1305
1307
String stringHandleResult = rowMgr .columnInfo (builtPlan , new StringHandle ()).get ();
@@ -1317,7 +1319,7 @@ public void testGenerateView() throws IOException {
1317
1319
PlanBuilder p = rowMgr .newPlanBuilder ();
1318
1320
1319
1321
PlanBuilder .PreparePlan builtPlan =
1320
- p .fromView ("opticUnitTest" , "musician" )
1322
+ p .fromView ("opticUnitTest" , VIEW_NAME )
1321
1323
.where (
1322
1324
p .cts .andQuery (
1323
1325
p .cts .jsonPropertyWordQuery ("instrument" , "trumpet" ),
@@ -1363,7 +1365,7 @@ private DOMHandle initNamespaces(DOMHandle handle) {
1363
1365
@ Test
1364
1366
public void testRawSQL () throws IOException {
1365
1367
String plan = "SELECT *\n " +
1366
- "FROM opticUnitTest.musician AS ''\n " +
1368
+ "FROM opticUnitTest.musician_ml10 AS ''\n " +
1367
1369
"WHERE lastName IN ('Armstrong', 'Davis')" +
1368
1370
"ORDER BY lastName;\n " ;
1369
1371
@@ -1404,7 +1406,7 @@ public void testRawSPARQLSelect() throws IOException {
1404
1406
@ Test
1405
1407
public void testRawQueryDSL () throws IOException {
1406
1408
String plan =
1407
- "op.fromView('opticUnitTest', 'musician ')\n " +
1409
+ "op.fromView('opticUnitTest', 'musician_ml10 ')\n " +
1408
1410
" .where(cts.andQuery([\n " +
1409
1411
" cts.jsonPropertyWordQuery('instrument', 'trumpet'),\n " +
1410
1412
" cts.jsonPropertyWordQuery('lastName', ['Armstrong', 'Davis'])\n " +
@@ -1447,7 +1449,7 @@ public void testSampleBy() throws IOException {
1447
1449
PlanSampleByOptions options = p .sampleByOptions ().withLimit (2 );
1448
1450
1449
1451
PlanBuilder .ExportablePlan builtPlan =
1450
- p .fromView ("opticUnitTest" , "musician" )
1452
+ p .fromView ("opticUnitTest" , VIEW_NAME )
1451
1453
.sampleBy (options );
1452
1454
1453
1455
RowSet <RowRecord > rows = rowMgr .resultRows (builtPlan );
@@ -1461,7 +1463,7 @@ public void testSampleByNoArg() throws IOException {
1461
1463
PlanBuilder p = rowMgr .newPlanBuilder ();
1462
1464
1463
1465
PlanBuilder .ExportablePlan builtPlan =
1464
- p .fromView ("opticUnitTest" , "musician" )
1466
+ p .fromView ("opticUnitTest" , VIEW_NAME )
1465
1467
.sampleBy ();
1466
1468
1467
1469
RowSet <RowRecord > rows = rowMgr .resultRows (builtPlan );
0 commit comments