diff --git a/datafusion/functions/src/core/mod.rs b/datafusion/functions/src/core/mod.rs index 8c5121397284..062a4a104d54 100644 --- a/datafusion/functions/src/core/mod.rs +++ b/datafusion/functions/src/core/mod.rs @@ -94,6 +94,7 @@ pub fn functions() -> Vec> { nvl2(), arrow_typeof(), named_struct(), + get_field(), coalesce(), ] } diff --git a/datafusion/sqllogictest/test_files/struct.slt b/datafusion/sqllogictest/test_files/struct.slt index 5c66bca1e0c2..f3ac6549ad06 100644 --- a/datafusion/sqllogictest/test_files/struct.slt +++ b/datafusion/sqllogictest/test_files/struct.slt @@ -72,6 +72,14 @@ select struct(a, b, c)['c1'] from values; 2.2 3.3 +# explicit invocation of get_field +query R +select get_field(struct(a, b, c), 'c1') from values; +---- +1.1 +2.2 +3.3 + # struct scalar function #1 query ? select struct(1, 3.14, 'e');