Github user hpandeycodeit commented on a diff in the pull request:

    https://github.com/apache/madlib/pull/184#discussion_r144158712
  
    --- Diff: src/ports/postgres/modules/knn/test/knn.sql_in ---
    @@ -55,15 +71,23 @@ copy knn_test_data (id, "DATA") from stdin delimiter 
'|';
     6|{50,45}
     \.
     drop table if exists madlib_knn_result_classification;
    -select 
knn('"KNN_TRAIN_DATA"','"DATA"','label','knn_test_data','"DATA"','id','madlib_knn_result_classification','c',3);
    +select 
knn('knn_train_data','data','id','label','knn_test_data','data','id','madlib_knn_result_classification',3,False);
     select assert(array_agg(prediction order by id)='{1,1,0,1,0,0}', 'Wrong 
output in classification with k=3') from madlib_knn_result_classification;
     
    +drop table if exists madlib_knn_result_classification;
    +select 
knn('knn_train_data','data','id','label','knn_test_data','data','id','madlib_knn_result_classification',3,True);
    +select assert((k_nearest_neighbours )='{1,2,3}', 'Wrong output in 
classification with k=3') from madlib_knn_result_classification where id = 1;
    --- End diff --
    
    @orhankislal 
    This query is giving the following error: 
    ```
    select unnest(k_nearest_neighbours) = ANY('{1,2}'::int[]) from 
madlib_knn_result_reg;
    ERROR:  op ANY/ALL (array) does not support set arguments
    ```
    
    So as a result, test case for KNN is failing. 


---

Reply via email to