File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ fn dict_key_type(d: &DataType) -> Option<DataType> {
6868 None
6969}
7070
71+ /// Parsed representation of a JSON path element.
7172#[ derive( Debug ) ]
7273pub enum JsonPath < ' s > {
7374 Key ( & ' s str ) ,
@@ -103,6 +104,10 @@ pub enum JsonPathArgs<'a> {
103104}
104105
105106impl < ' s > JsonPathArgs < ' s > {
107+ /// Extract the JSON path from the arguments to a json function.
108+ /// The path can be:
109+ /// - A single array argument (`json_get(json_data, keys_column)`)
110+ /// - One or more scalar arguments (`json_get(json_data, 'foo', 0)`)
106111 pub fn extract_path ( path_args : & ' s [ ColumnarValue ] ) -> DataFusionResult < Self > {
107112 // If there is a single argument as an array, we know how to handle it
108113 if let Some ( ( ColumnarValue :: Array ( array) , & [ ] ) ) = path_args. split_first ( ) {
You can’t perform that action at this time.
0 commit comments