rdblue commented on code in PR #4606:
URL: https://github.com/apache/iceberg/pull/4606#discussion_r857185250


##########
docs/spark/spark-ddl.md:
##########
@@ -91,11 +91,15 @@ Supported transformations are:
 
 ## `CREATE TABLE ... AS SELECT`
 
-Iceberg supports CTAS as an atomic operation when using a 
[`SparkCatalog`](../spark-configuration#catalog-configuration). CTAS is 
supported, but is not atomic when using 
[`SparkSessionCatalog`](../spark-configuration#replacing-the-session-catalog).
+Iceberg supports CTAS as an atomic operation when using a 
[`SparkCatalog`](../spark-configuration#catalog-configuration). CTAS is 
supported, but is not atomic when using 
[`SparkSessionCatalog`](../spark-configuration#replacing-the-session-catalog). 
+
+The newly created table won't inherit the partition spec and table properties 
from the source table in SELECT, you can use PARTITIONED BY and TBLPROPERTIES  
in CTAS to declare partition spec and table properties for the new table.
 
 ```sql
 CREATE TABLE prod.db.sample
 USING iceberg
+PARTITIONED BY (part)
+TBLPROPERTIES ('key'='value')

Review Comment:
   Documentation should start with simple examples and add more complexity if 
needed.
   
   In this case, I think it is valid to add a `PARTITIONED BY` example, but not 
by modifying the first simple example. Please add the new paragraph and a 
separate example after the existing introduction to CTAS.



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

Reply via email to