Zouxxyy commented on code in PR #4638:
URL: https://github.com/apache/paimon/pull/4638#discussion_r1869136857
##########
paimon-core/src/main/java/org/apache/paimon/schema/SchemaManager.java:
##########
@@ -254,6 +246,41 @@ public TableSchema createTable(Schema schema, boolean
ignoreIfExistsSame) throws
}
}
+ private TableSchema mergeSchemaForExternalTable(TableSchema oldSchema,
Schema newSchema)
Review Comment:
Spark supports automatic inference the schema of external table
```sql
spark-sql (default)> create table t0 (id int) using parquet;
Time taken: 0.222 seconds
spark-sql (default)> insert into t0 values 1;
Time taken: 1.514 seconds
spark-sql (default)> create table t0_ext using parquet location
'/user/hive/warehouse/t0';
Time taken: 0.231 seconds
spark-sql (default)> select * from t0_ext;
1
Time taken: 0.153 seconds, Fetched 1 row(s)
spark-sql (default)> show create table t0_ext;
CREATE TABLE default.t0_ext (
id INT)
USING parquet
LOCATION '/hive/warehouse/t0'
```
--
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]