yunfengzhou-hub commented on code in PR #103:
URL: https://github.com/apache/flink-ml/pull/103#discussion_r882414098


##########
flink-ml-lib/src/test/java/org/apache/flink/ml/classification/KnnTest.java:
##########
@@ -121,8 +124,9 @@ private static void verifyPredictionResult(Table output, 
String labelCol, String
                                     @Override
                                     public Tuple2<Double, Double> map(Row row) 
{
                                         return Tuple2.of(
-                                                (Double) 
row.getField(labelCol),
-                                                (Double) 
row.getField(predictionCol));
+                                                ((Number) 
row.getField(labelCol)).doubleValue(),

Review Comment:
   The `labelCol` here is actually an input col, which could be any numerical 
type. the actual output double-typed label column is `predictionCol`. I'll 
modify this column to remove `Number::doubleValue()`.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to