alamb commented on code in PR #21353:
URL: https://github.com/apache/datafusion/pull/21353#discussion_r3390558523


##########
Cargo.toml:
##########
@@ -135,6 +136,7 @@ datafusion-ffi = { path = "datafusion/ffi", version = 
"53.0.0" }
 datafusion-functions = { path = "datafusion/functions", version = "53.0.0" }
 datafusion-functions-aggregate = { path = "datafusion/functions-aggregate", 
version = "53.0.0" }
 datafusion-functions-aggregate-common = { path = 
"datafusion/functions-aggregate-common", version = "53.0.0" }
+datafusion-functions-json = { path = "datafusion/functions-json", version = 
"53.0.0" }

Review Comment:
   will need to merge up from main and update this to 54 I think



##########
Cargo.lock:
##########
@@ -2296,6 +2297,20 @@ dependencies = [
  "rand 0.9.2",
 ]
 
+[[package]]

Review Comment:
   It is very nice that this crate adds  no new dependencies 👌 



##########
datafusion/functions-json/README.md:
##########
@@ -0,0 +1,43 @@
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+# datafusion-functions-json
+
+JSON scalar functions for [DataFusion](https://datafusion.apache.org/).
+
+This crate provides JSON manipulation functions operating on JSON-encoded 
strings.
+Based on the 
[datafusion-functions-json](https://github.com/datafusion-contrib/datafusion-functions-json)
+community crate.
+
+## Functions
+
+| Function                        | Description                                
                 |
+| ------------------------------- | 
----------------------------------------------------------- |
+| `json_get_str(json, key1, ...)` | Extract a string value from a JSON string 
at the given path |
+
+## Usage
+
+These functions are registered automatically when the `json_expressions` 
feature

Review Comment:
   if at all possible I would like to request we avoid a new dependency IN 
datafusion itself (as in `datafusion` depends on `datafusion-json`, even though 
it is an optional dependency it makes the compile time for datafusion that much 
longer
   
   Instead, can we please leave the dependency like `datafusion-functions-json` 
depends on `datafusion`, following the model of `datafusion-functions-spark`: 
   
   
https://github.com/apache/datafusion/blob/8bbc46004183c22bd6caf0b7492c21540248a084/datafusion/spark/src/lib.rs#L73-L78
   
   The idea is that while this requires a small amount more downstream 
configuration it will keep the size of the core down and more easily allow 
people to assemble systems customized to their usage



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to