Skip to content

Commit 466f5cf

Browse files
committed
fix path resolution
1 parent 111cc94 commit 466f5cf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

performance/src/main/java/com/clickhouse/benchmark/data/DataSetGenerator.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.io.IOException;
1010
import java.io.StringReader;
1111
import java.nio.file.Files;
12+
import java.nio.file.Path;
1213
import java.nio.file.Paths;
1314
import java.time.Duration;
1415
import java.time.LocalDateTime;
@@ -69,7 +70,13 @@ public static void main(String[] args) throws IOException {
6970
return;
7071
}
7172

72-
inputSQL = new String(Files.readAllBytes(Paths.get(inputSQL)));
73+
try {
74+
Path path = Paths.get(inputSQL);
75+
System.out.println("SQL file path: " + path + " cwd: " + System.getProperty("user.dir"));
76+
inputSQL = new String(Files.readAllBytes(path));
77+
}catch (Exception e) {
78+
e.printStackTrace();
79+
}
7380

7481
// Parse the SQL create table statement
7582
List<Column> originalColumns;

0 commit comments

Comments
 (0)