Skip to content

Commit 0e68c71

Browse files
committed
Remove union implementation for Kuzu
1 parent 047978e commit 0e68c71

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/ops/targets/kuzu.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,7 @@ fn basic_type_to_kuzu(basic_type: &BasicValueType) -> Result<String> {
123123
t.dimension
124124
.map_or_else(|| "".to_string(), |d| d.to_string())
125125
),
126-
BasicValueType::Union(t) => format!(
127-
"UNION({})",
128-
t.types.iter()
129-
.enumerate()
130-
.map(|(i,typ)| Ok(format!("val{} {}", i, basic_type_to_kuzu(typ)?)))
131-
.collect::<Result<Vec<_>>>()?
132-
.join(", "),
133-
),
134-
t @ (BasicValueType::Time | BasicValueType::Json) => {
126+
t @ (BasicValueType::Union(_) | BasicValueType::Time | BasicValueType::Json) => {
135127
api_bail!("{t} is not supported in Kuzu")
136128
}
137129
})
@@ -387,12 +379,7 @@ fn append_basic_value(cypher: &mut CypherBuilder, basic_value: &BasicValue) -> R
387379
}
388380
write!(cypher.query_mut(), "]")?;
389381
}
390-
BasicValue::UnionVariant { tag_id, value } => {
391-
write!(cypher.query_mut(), "union_value(val{}:=", tag_id)?;
392-
append_basic_value(cypher, value)?;
393-
write!(cypher.query_mut(), ")")?;
394-
}
395-
v @ (BasicValue::Time(_) | BasicValue::Json(_)) => {
382+
v @ (BasicValue::UnionVariant { .. } | BasicValue::Time(_) | BasicValue::Json(_)) => {
396383
bail!("value types are not supported in Kuzu: {}", v.kind());
397384
}
398385
}

0 commit comments

Comments
 (0)