Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions DEPENDENCIES.rust.tsv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions benchmarks/tpcds/DEPENDENCIES.rust.tsv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions bindings/c/DEPENDENCIES.rust.tsv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions bindings/go/DEPENDENCIES.rust.tsv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions bindings/python/DEPENDENCIES.rust.tsv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ tar = "0.4"
tempfile = "3"
serde_json = "1"
axum = { version = "0.7", features = ["macros", "tokio", "http1", "http2"] }
uuid = { version = "1", features = ["v4"] }
14 changes: 7 additions & 7 deletions crates/integration_tests/DEPENDENCIES.rust.tsv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions crates/integrations/datafusion/DEPENDENCIES.rust.tsv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions crates/integrations/datafusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,21 @@ let view = ctx.sql("SELECT * FROM analytics_view").await?;
let function = ctx.sql("SELECT plus_one(score) FROM scores").await?;
```

## Persistent CREATE TABLE AS SELECT

Use `CREATE TABLE AS SELECT` to materialize a bounded query as a native Paimon
table. The query determines the destination schema. In this example, `scores`
resolves in the session's current catalog and database.

```sql
CREATE TABLE paimon.reporting.results
WITH ('bucket' = '-1')
AS SELECT id, score FROM scores WHERE score > 10;
```

`IF NOT EXISTS` skips an existing target. If population fails after creation,
the destination remains in the catalog. For supported types, concurrent DDL,
cancellation and recovery after a commit error, see the
[SQL reference](../../../docs/src/sql.md#create-table-as-select).

See the [documentation](https://paimon.apache.org/docs/rust/datafusion/) for getting started guide and more details.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub(crate) async fn execute_analyze(
"ANALYZE TABLE requires COMPUTE STATISTICS".to_string(),
));
}
SQLContext::ensure_partition_command_target(table_name, "ANALYZE TABLE")?;
SQLContext::ensure_main_branch_base_table(table_name, "ANALYZE TABLE")?;
ctx.reject_temporary_write_target(table_name, "ANALYZE TABLE")
.await?;
let (catalog, _catalog_name, identifier) = ctx.resolve_catalog_and_table(table_name)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/integrations/datafusion/src/format_partition_ddl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub(crate) async fn execute_show_partitions(
show_partitions: &ShowPartitionsStatement,
enable_ident_normalization: bool,
) -> DFResult<DataFrame> {
SQLContext::ensure_partition_command_target(&show_partitions.table_name, "SHOW PARTITIONS")?;
SQLContext::ensure_main_branch_base_table(&show_partitions.table_name, "SHOW PARTITIONS")?;
let (catalog, _catalog_name, identifier) =
ctx.resolve_catalog_and_table(&show_partitions.table_name)?;
let table = catalog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub(crate) async fn execute_msck(ctx: &SQLContext, msck: &Msck) -> DFResult<Data
"MSCK requires the REPAIR keyword".to_string(),
));
}
SQLContext::ensure_partition_command_target(&msck.table_name, "MSCK REPAIR TABLE")?;
SQLContext::ensure_main_branch_base_table(&msck.table_name, "MSCK REPAIR TABLE")?;
ctx.reject_temporary_write_target(&msck.table_name, "MSCK REPAIR TABLE")
.await?;
let (catalog, _catalog_name, identifier) = ctx.resolve_catalog_and_table(&msck.table_name)?;
Expand Down
Loading
Loading