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: 
It runs fine when you remove Spark core dependency.

try same code with just below Spark sql dependency.

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

```
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));

```