spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Himasha de Silva <>
Subject [Spark SQL]: Dataset<Row> can not map into Dataset<Integer> in java
Date Fri, 08 Dec 2017 05:11:59 GMT

 I'm trying to map a Dataset<Row> that read from csv files into a
But it gives some errors. Can anyone please help me to figure it out?

Dataset<Row> t_en_data ="header","true")

Dataset<Integer> mappedDataset = t_en_data
        .map((MapFunction<Row, Integer>) row
->row.<Integer>getAs("Duration"), Encoders.INT());;

error -


Himasha De Silva

View raw message