orhankislal commented on a change in pull request #433: Kmeans: Add automatic
optimal cluster estimation
URL: https://github.com/apache/madlib/pull/433#discussion_r321408922
##########
File path: src/ports/postgres/modules/kmeans/kmeans.sql_in
##########
@@ -999,7 +999,7 @@ BEGIN
sampled_rel_source = MADLIB_SCHEMA.__unique_string();
sampled_col_name = MADLIB_SCHEMA.__unique_string();
IF (seeding_sample_ratio < 1.0) THEN
- EXECUTE 'DROP TABLE IF EXISTS '||sampled_rel_source;
+ EXECUTE 'DROP TABLE IF EXISTS '||sampled_rel_source||' CASCADE';
Review comment:
The table name, `samples_rel_source`, should be unique; therefore not
require a drop table clause at all. However, we call kmeans multiple times
within a single sql call, which causes the table name to stay the same. To
successfully drop it, we have to add cascade.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services