yunfengzhou-hub commented on code in PR #103:
URL: https://github.com/apache/flink-ml/pull/103#discussion_r883234948
##########
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:
According to offline discussion, label column is inherited from input table
and remain untouched, which means it could be double or integer type. Thus we
still need to use (Number)...doubleValue() in order to extract its value.
--
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]