shrirangmhalgi commented on PR #56319: URL: https://github.com/apache/spark/pull/56319#issuecomment-4898206811
> I wonder if the new internal error should be thrown in `DataSource.scala` instead, if the original internal error is confusing, so that all read-only sources can benefit, rather than extending the interface + throwing for State(Meta)DataSource only. Apologies for late reply. @liviazhu thats a good question. The `case _ branch` in `DataSource.planForWriting` is a generic catch-all - it fires for any source that doesn't implement `CreatableRelationProvider`, whether intentionally read-only or simply missing a write implementation. Improving that generic message is a valid idea, but it can't produce source-specific context like "state data source 'statestore' is read-only." Implementing `CreatableRelationProvider` lets each source intercept early with a targeted error message. Other read-only sources can adopt the same pattern independently. Happy to improve the generic `case _` message as a separate follow-up if that's useful. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
