From dad329fcbae0524df66a7ac083414daca29f226a Mon Sep 17 00:00:00 2001 From: Robert Yokota Date: Sun, 21 Jul 2024 09:32:34 -0700 Subject: [PATCH] Quote union branch names in INSERT stmt --- pom.xml | 2 +- src/main/java/io/kcache/kwack/KwackEngine.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 03b8336..4146b3d 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ io.kcache kwack - 0.4.0 + 0.5.0 jar kwack diff --git a/src/main/java/io/kcache/kwack/KwackEngine.java b/src/main/java/io/kcache/kwack/KwackEngine.java index 51a1f10..fd623cc 100644 --- a/src/main/java/io/kcache/kwack/KwackEngine.java +++ b/src/main/java/io/kcache/kwack/KwackEngine.java @@ -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("?"); } @@ -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("?"); }