Skip to content

Commit efdb492

Browse files
committed
[SPARK-55277][SQL] Add protobuf_funcs group for Protobuf SQL functions
### What changes were proposed in this pull request? Similar to how Avro functions have their own `avro_funcs` group, Protobuf functions (`from_protobuf`, `to_protobuf`) should have their own `protobuf_funcs` group instead of being grouped under `misc_funcs`. This improves consistency with how other format-specific functions are organized and makes the documentation clearer for users. Changes: - Move `from_protobuf` and `to_protobuf` from `misc_funcs` to `protobuf_funcs` - Add `protobuf_funcs` to the groups set in `gen-sql-functions-docs.py` ### Why are the changes needed? Consistency with `avro_funcs`, `json_funcs`, `csv_funcs`, `xml_funcs` groupings. ### Does this PR introduce _any_ user-facing change? No functional changes. The only difference is in how functions are grouped in documentation. ### How was this patch tested? Existing tests. ### Was this patch authored or co-authored using generative AI tooling? Yes, GitHub Copilot was used to assist with this change. Closes #54059 from yaooqinn/SPARK-55277-protobuf-funcs-group. Authored-by: Kent Yao <kentyao@microsoft.com> Signed-off-by: Kent Yao <kentyao@microsoft.com>
1 parent 8e65769 commit efdb492

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/toFromProtobufSqlFunctions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import org.apache.spark.util.Utils
5858
To deserialize the data with a compatible and evolved schema, the expected Protobuf schema can be
5959
set via the corresponding option.
6060
""",
61-
group = "misc_funcs",
61+
group = "protobuf_funcs",
6262
since = "4.0.0"
6363
)
6464
// scalastyle:on line.size.limit
@@ -195,7 +195,7 @@ case class FromProtobuf(
195195
> SELECT _FUNC_(s, 'Person', '/path/to/descriptor.desc', map('emitDefaultValues', 'true')) IS NULL FROM (SELECT NULL AS s);
196196
[true]
197197
""",
198-
group = "misc_funcs",
198+
group = "protobuf_funcs",
199199
since = "4.0.0"
200200
)
201201
// scalastyle:on line.size.limit

sql/gen-sql-functions-docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"bitwise_funcs", "conversion_funcs", "csv_funcs",
3737
"xml_funcs", "lambda_funcs", "collection_funcs",
3838
"url_funcs", "hash_funcs", "struct_funcs",
39-
"table_funcs", "variant_funcs"
39+
"table_funcs", "variant_funcs", "protobuf_funcs"
4040
}
4141

4242

0 commit comments

Comments
 (0)