Skip to content

Commit 488edb5

Browse files
committed
Fix thing
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 83b0b7c commit 488edb5

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

encodings/parquet-variant/src/fns/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use vortex_array::scalar_fn::ScalarFnVTableExt;
2020
/// `child` must produce `Utf8` or [`Json`](vortex_json::Json) extension values; the result is
2121
/// `Variant` with the input's nullability. Rows containing invalid JSON fail the expression.
2222
///
23-
/// Note that this is NOT an inverse of [`variant_to_json`]: both conversions normalize their
23+
/// Note that this is NOT an inverse of [`variant_to_json()`]: both conversions normalize their
2424
/// input. See [`JsonToVariant`] for the full list of caveats.
2525
pub fn json_to_variant(child: Expression, shredding: ShreddingSpec) -> Expression {
2626
JsonToVariant.new_expr(JsonToVariantOptions::new(shredding), [child])
@@ -32,7 +32,7 @@ pub fn json_to_variant(child: Expression, shredding: ShreddingSpec) -> Expressio
3232
/// Shredded inputs are unshredded before rendering, and the result keeps the input's
3333
/// nullability.
3434
///
35-
/// Note that this is NOT an inverse of [`json_to_variant`]: both conversions normalize their
35+
/// Note that this is NOT an inverse of [`json_to_variant()`]: both conversions normalize their
3636
/// input, and Variant-only types (dates, timestamps, UUIDs, binary, decimals) are rendered as
3737
/// plain JSON strings or numbers. See [`VariantToJson`] for the full list of caveats.
3838
pub fn variant_to_json(child: Expression) -> Expression {

encodings/parquet-variant/src/fns/variant_to_json.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,6 @@ impl ScalarFnVTable for VariantToJson {
157157
fn is_null_sensitive(&self, _options: &Self::Options) -> bool {
158158
false
159159
}
160-
161-
fn is_fallible(&self, _options: &Self::Options) -> bool {
162-
false
163-
}
164160
}
165161

166162
#[cfg(test)]
@@ -289,6 +285,12 @@ mod tests {
289285
assert_eq!(expr.to_string(), "variant_to_json($)");
290286
}
291287

288+
#[test]
289+
fn is_fallible() {
290+
let expr = variant_to_json(root());
291+
assert!(expr.signature().is_fallible());
292+
}
293+
292294
#[test]
293295
fn renders_unshredded_values() -> VortexResult<()> {
294296
let input = unshredded_variant([

0 commit comments

Comments
 (0)