Skip to content

Commit 94ef36d

Browse files
committed
call getSchemaChange() only if createSchema=true
1 parent 466ecd8 commit 94ef36d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dashjoin-core/src/main/java/org/dashjoin/mapping/AbstractSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ protected void set(Map<String, Object> update) throws Exception {
124124

125125
AbstractDatabase ddl(AbstractDatabase db, Map<String, List<Map<String, Object>>> tables)
126126
throws Exception {
127-
SchemaChange ddl = db.getSchemaChange();
128127
boolean dirty = false;
129128

130129
try {
131130
for (Entry<String, List<Map<String, Object>>> table : tables.entrySet()) {
132131
if (createSchema != null && createSchema) {
133132

133+
SchemaChange ddl = db.getSchemaChange();
134134
Mapping mapping = mappings == null ? null : mappings.get(table.getKey());
135135
String mappingpk = null;
136136
if (mapping == null || mapping.pk == null) {

0 commit comments

Comments
 (0)