Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-16401

Data Source APIs: Extending RelationProvider and CreatableRelationProvider Without SchemaRelationProvider

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      When users try to implement a data source API with extending only RelationProvider and CreatableRelationProvider, they will hit an error when resolving the relation.

      spark.read
      .format("org.apache.spark.sql.test.DefaultSourceWithoutUserSpecifiedSchema")
        .load()
        .write.
      format("org.apache.spark.sql.test.DefaultSourceWithoutUserSpecifiedSchema")
        .save()
      

      The error they hit is like

      xyzDataSource does not allow user-specified schemas.;
      org.apache.spark.sql.AnalysisException: xyzDataSource does not allow user-specified schemas.;
      	at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:319)
      	at org.apache.spark.sql.execution.datasources.DataSource.write(DataSource.scala:494)
      	at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:211)
      

        Attachments

          Activity

            People

            • Assignee:
              smilegator Xiao Li
              Reporter:
              smilegator Xiao Li
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: