Question: This spark sql code compiles and run but intelliJ (idea-IU-172.4343.14) shows an "Ambigious method call" error.

[![enter image description here](https://i.stack.imgur.com/lo7HU.png)](https://i.stack.imgur.com/lo7HU.png)

```
public static void main(String[] args) {

    SparkSession session = SparkSession //
            .builder() //
            .appName("idea-ambigious-method-call-bug") //
            .master("local[*]") //
            .getOrCreate();

    Dataset<String> cities = session//
            .sqlContext()//
            .createDataset(Arrays.asList("Paris", "Porto", "London"), Encoders.STRING());

    cities.filter(name -> name.startsWith("P")).show();
}

```

This wasn't happening with previous versions of intelliJ.

```
<dependencies>
    <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-core_2.11</artifactId>
        <version>2.2.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-sql_2.11</artifactId>
        <version>2.2.0</version>
    </dependency>
</dependencies>

```

Answer: 
I think this could be linked to the scala plugin. The plugin makes the source code of Spark readable and IntelliJ fails in choosing the right method. If you deinstall the plugin from IntelliJ everything should work fine. However, you'll loose the possibility to have a readable Spark source code.
I'm having the same issue(Multiple implementation for map), on IntelliJ IU-182, but if run the same program from terminal, don't have any compiler issue.

```
    SparkSession session = SparkSession.builder().appName("ALB log Analyzer").master("local[2]").getOrCreate();
    Dataset<ALBLog> accessLogs = session.read().textFile(logFile).map(ALBLog::parseAlbLog,
            Encoders.bean(ALBLog.class));

```