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

    https://github.com/apache/madlib/pull/315#discussion_r213794697
  
    --- Diff: src/ports/postgres/modules/knn/knn.py_in ---
    @@ -290,11 +303,11 @@ def knn(schema_madlib, point_source, 
point_column_name, point_id,
                     ON knn_temp.{test_id_temp} = knn_test.{test_id}
                         {view_join}
                     GROUP BY knn_temp.{test_id_temp},
    -                         knn_test.{test_column_name}
    +                    {test_column_name}
                              {view_grp_by}
                 """
             plpy.execute(sql.format(**locals()))
    -        plpy.execute("DROP TABLE IF EXISTS {0}".format(interim_table))
    +        # plpy.execute("DROP TABLE IF EXISTS {0}".format(interim_table))
    --- End diff --
    
    Please bring this back to delete intermediate tables.
    In general, if we create any table that is not part of the output, it has 
to be dropped. So, if you create `point_source_temp_table` and 
`test_source_temp_table`, they should also be dropped (in this PR, we don't 
need to create these tables as mentioned in an earlier comment).


---

Reply via email to