Skip to content

Commit 85d701d

Browse files
committed
forgot dynamic data path
1 parent 339021f commit 85d701d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wayang-api/wayang-api-sql/src/test/java/org/apache/wayang/api/sql/SqlToWayangRelTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ public void test_simple_sql() throws Exception {
352352

353353
private SqlContext createSqlContext(final String tableResourceName)
354354
throws IOException, ParseException, SQLException {
355-
356355
final String calciteModel = "{\r\n" + //
357356
" \"calcite\": {\r\n" + //
358357
" \"version\": \"1.0\",\r\n" + //
@@ -363,7 +362,7 @@ private SqlContext createSqlContext(final String tableResourceName)
363362
" \"type\": \"custom\",\r\n" + //
364363
" \"factory\": \"org.apache.calcite.adapter.file.FileSchemaFactory\",\r\n" + //
365364
" \"operand\": {\r\n" + //
366-
" \"directory\": \"//var/www/html/wayang-api/wayang-api-sql/src/test/resources/data\"\r\n" + //
365+
" \"directory\": \"" + "/" + this.getClass().getResource("/data").getPath() + "\"\r\n" + //
367366
" }\r\n" + //
368367
" }\r\n" + //
369368
" ]\r\n" + //
@@ -373,7 +372,8 @@ private SqlContext createSqlContext(final String tableResourceName)
373372
" \r\n" + //
374373
" \r\n" + //
375374
"";
376-
375+
376+
System.out.println("model " + calciteModel);
377377
final JSONObject calciteModelJSON = (JSONObject) new JSONParser().parse(calciteModel);
378378
final Configuration configuration = new ModelParser(new Configuration(), calciteModelJSON)
379379
.setProperties();

0 commit comments

Comments
 (0)