Skip to content

Commit 4342422

Browse files
grieve54706goldmedal
authored andcommitted
chore(duckdb): add log to ensure duckdb execute init sql and session sql (#748)
1 parent 067df44 commit 4342422

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

wren-base/src/main/java/io/wren/base/client/duckdb/DuckdbClient.java

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ private void init()
7676
initPool();
7777
if (duckDBSettingSQL != null) {
7878
if (duckDBSettingSQL.getInitSQL() != null) {
79+
LOG.info("Initialize by init SQL"); // Not print the SQL to avoid leaking sensitive information
7980
executeDDL(duckDBSettingSQL.getInitSQL());
8081
}
8182
}
@@ -123,6 +124,7 @@ private static String buildConnectionInitSql(DuckDBSettingSQL duckDBSettingSQL,
123124
sql.add("SET autoinstall_known_extensions = true");
124125
if (duckDBSettingSQL != null) {
125126
if (duckDBSettingSQL.getSessionSQL() != null) {
127+
LOG.info("Append session SQL to connection init SQL"); // Not print the SQL to avoid leaking sensitive information
126128
sql.add(duckDBSettingSQL.getSessionSQL());
127129
}
128130
}

0 commit comments

Comments
 (0)