[ https://issues.apache.org/jira/browse/MADLIB-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16578806#comment-16578806 ]
Himanshu Pandey edited comment on MADLIB-1060 at 8/14/18 6:35 PM: ------------------------------------------------------------------ [~okislal] [~fmcquillan] In KNN, we are using 'point_column_name' and 'test_column_name' are to calculate the distance using the distance function passed by the user. Supported distance functions accept arguments in array format and so does these columns. {code} SELECT test.{test_id} AS {test_id_temp}, train.{point_id} as train_id, {fn_dist}( train.{point_column_name}, test.{test_column_name}) AS dist {label_out} FROM {point_source} AS train, {test_source} AS test ) {x_temp_table} {code} So does this mean these columns should be supporting the array expressions only? was (Author: hpan...@pivotal.io): In KNN, we are using 'point_column_name' and 'test_column_name' are to calculate the distance using the distance function passed by the user. Supported distance functions accept arguments in array format and so does these columns. {code} SELECT test.{test_id} AS {test_id_temp}, train.{point_id} as train_id, {fn_dist}( train.{point_column_name}, test.{test_column_name}) AS dist {label_out} FROM {point_source} AS train, {test_source} AS test ) {x_temp_table} {code} So does this mean these columns should be supporting the array expressions only? > Support expressions for column names in k-NN > -------------------------------------------- > > Key: MADLIB-1060 > URL: https://issues.apache.org/jira/browse/MADLIB-1060 > Project: Apache MADlib > Issue Type: Improvement > Components: k-NN > Reporter: Frank McQuillan > Assignee: Himanshu Pandey > Priority: Minor > Labels: starter > Fix For: v2.0 > > > Follow on to > https://issues.apache.org/jira/browse/MADLIB-927 > {code} > knn( point_source, > point_column_name, > label_column_name, > test_source, > test_column_name, > id_column_name, > output_table, > operation, > k > ) > {code} > Possible improvements: > 1) The parameters 'point_column_name' and 'test_column_name' should support > regular PostgreSQL expressions. > 2) Should we infer 'c' or 'r' from the data types, rather than have to say > explicitly? -- This message was sent by Atlassian JIRA (v7.6.3#76005)