title: Spark giving multiple datasource error on saving parquet file
body: <p>I am trying to learn spark and scala, on my trying to write the dataframe object of my result to parquet file by calling the parquet method, i am getting error as such</p>
  <p>Code Base that fails:-</p>
  <pre><code>df2.write.mode(SaveMode.Overwrite).parquet(outputPath)
  </code></pre>
  <p>This fails too</p>
  <pre><code>df2.write.format(&quot;org.apache.spark.sql.execution.datasources.parquet.ParquetFileFormat&quot;).mode(SaveMode.Overwrite).parquet(outputPath)
  </code></pre>
  <p>Error Log:-</p>
  <pre><code>Exception in thread &quot;main&quot; org.apache.spark.sql.AnalysisException: Multiple sources found for parquet (org.apache.spark.sql.execution.datasources.v2.parquet.ParquetDataSourceV2, org.apache.spark.sql.execution.datasources.parquet.ParquetFileFormat), please specify the fully qualified class name.;
  at org.apache.spark.sql.execution.datasources.DataSource$.lookupDataSource(DataSource.scala:707)
  at org.apache.spark.sql.execution.datasources.DataSource$.lookupDataSourceV2(DataSource.scala:733)
  at org.apache.spark.sql.DataFrameWriter.lookupV2Provider(DataFrameWriter.scala:967)
  at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:304)
  at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:288)
  at org.apache.spark.sql.DataFrameWriter.parquet(DataFrameWriter.scala:848)
  </code></pre>
  <p>How ever if I called another method for the save, the code works properly,</p>
  <p>This works fine:-</p>
  <pre><code>df2.write.format(&quot;org.apache.spark.sql.execution.datasources.parquet.ParquetFileFormat&quot;).mode(SaveMode.Overwrite).save(outputPath)
  </code></pre>
  <p>Although I have a solution for the issue, i'd like to understand why the first approach is not working and how I can solve it.</p>
  <p>The details of the specification i am using are:-
  Scala 2.12.9
  Java 1.8
  Spark 2.4.4</p>
  <p>P.S. This issue is only seen on spark-submit</p>