You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/05/26 07:54:48 UTC

[GitHub] [flink-ml] yunfengzhou-hub commented on a diff in pull request #103: [FLINK-27742] Fix Compatibility Issue Between Stages

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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org