You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2023/05/08 04:36:06 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #41070: [SPARK-43390][SQL] DSv2 allows CTAS/RTAS to reserve schema nullability

cloud-fan commented on code in PR #41070:
URL: https://github.com/apache/spark/pull/41070#discussion_r1187015154


##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableCatalog.java:
##########
@@ -199,6 +199,14 @@ default Table createTable(
     return createTable(ident, CatalogV2Util.v2ColumnsToStructType(columns), partitions, properties);
   }
 
+  /**
+   * Return whether to reserve schema nullability of query output or forcibly use nullable schema
+   * on creating table implicitly, e.g. CTAS/RTAS.
+   */
+  default boolean createTableReserveSchemaNullability() {

Review Comment:
   how about
   ```
   /**
    * If true, mark all the fields of the query schema as nullable when executing
    * CREATE/REPLACE TABLE ... AS SELECT ... and creating the table.
    */
   default boolean useNullableQuerySchema
   ```



-- 
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