Skip to content

Commit

Permalink
Quote union branch names in INSERT stmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Jul 21, 2024
1 parent 456111d commit dad329f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>io.kcache</groupId>
<artifactId>kwack</artifactId>
<version>0.4.0</version>
<version>0.5.0</version>
<packaging>jar</packaging>

<name>kwack</name>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/kcache/kwack/KwackEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,8 @@ public void handleUpdate(Headers headers,
for (ColumnDef columnDef : structColumnDef.getColumnDefs().values()) {
if (columnDef.getColumnType() == DuckDBColumnType.UNION) {
UnionColumnDef unionColumnDef = (UnionColumnDef) columnDef;
paramMarkers.add("union_value("
+ valueObj._1.getUnionBranch(unionColumnDef) + " := ?)");
paramMarkers.add("union_value(\""
+ valueObj._1.getUnionBranch(unionColumnDef) + "\" := ?)");
} else {
paramMarkers.add("?");
}
Expand All @@ -830,8 +830,8 @@ public void handleUpdate(Headers headers,
} else {
if (valueColDef.getColumnType() == DuckDBColumnType.UNION) {
UnionColumnDef unionColumnDef = (UnionColumnDef) valueColDef;
paramMarkers.add("union_value("
+ valueObj._1.getUnionBranch(unionColumnDef) + " := ?)");
paramMarkers.add("union_value(\""
+ valueObj._1.getUnionBranch(unionColumnDef) + "\" := ?)");
} else {
paramMarkers.add("?");
}
Expand Down

0 comments on commit dad329f

Please sign in to comment.