You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "yaooqinn (via GitHub)" <gi...@apache.org> on 2025/07/10 08:11:28 UTC

Re: [PR] [SPARK-52745][SQL] Ensure one of the `schema` and `columns` in the Table interface is implemented and `columns` is preferable [spark]

yaooqinn commented on code in PR #51434:
URL: https://github.com/apache/spark/pull/51434#discussion_r2196940275


##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/Table.java:
##########
@@ -56,7 +57,9 @@ public interface Table {
    * @deprecated This is deprecated. Please override {@link #columns} instead.
    */
   @Deprecated(since = "3.4.0")
-  StructType schema();
+  default StructType schema() {
+    throw QueryCompilationErrors.mustOverrideOneMethodError("columns");

Review Comment:
   I refined the title to 
   Ensure one of the `schema` and `columns` in the Table interface is implemented and `columns` is preferable



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org