Github user iyerr3 commented on a diff in the pull request: https://github.com/apache/madlib/pull/225#discussion_r162369486 --- Diff: src/ports/postgres/modules/knn/knn.py_in --- @@ -167,22 +169,31 @@ def knn(schema_madlib, point_source, point_column_name, point_id, knn_neighbors = "" label_out = "" cast_to_int = "" + k_neighbours = "" + k_neighbours_unnest = "" if output_neighbors: knn_neighbors = (", array_agg(knn_temp.train_id ORDER BY " "knn_temp.dist ASC) AS k_nearest_neighbours ") + k_neighbours = ", array_agg(distinct k_neighbours) AS k_nearest_neighbours" --- End diff -- Let's update these names to reflect the difference between `knn_neighbors` and `k_neighbors`.
---