Skip to content

Commit 09953f0

Browse files
Add comment explaining SQL registration approach
1 parent ca9d173 commit 09953f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

knowledge_base/udtf-operator/src/kmeans_udtf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def register(catalog: str, schema: str, name: str = "k_means"):
5050
spark = SparkSession.builder.getOrCreate()
5151
source = inspect.getsource(SklearnKMeans)
5252

53+
# Use SQL CREATE FUNCTION since the Python API for registering UDTFs is still experimental
5354
spark.sql(f"""
5455
CREATE OR REPLACE FUNCTION {catalog}.{schema}.{name}(
5556
input_data TABLE,

0 commit comments

Comments
 (0)