From c071c93469698ebae559a3879d597594be8af7cf Mon Sep 17 00:00:00 2001 From: Jacek Laskowski Date: Thu, 21 Mar 2024 23:48:24 +0100 Subject: [PATCH] TruncateTableCommand Logical Command --- docs/SessionCatalog.md | 12 +++++ .../logical-operators/TruncateTableCommand.md | 46 ++++++++++++------- 2 files changed, 41 insertions(+), 17 deletions(-) diff --git a/docs/SessionCatalog.md b/docs/SessionCatalog.md index 9336b748c1a..080b83959a1 100644 --- a/docs/SessionCatalog.md +++ b/docs/SessionCatalog.md @@ -313,3 +313,15 @@ registerFunction[T]( * `CreateFunctionCommand` is executed * `RefreshFunctionCommand` is executed * `SessionCatalog` is requested to [resolvePersistentFunctionInternal](#resolvePersistentFunctionInternal) + +## Looking Up Table Metadata { #getTableMetadata } + +```scala +getTableMetadata( + name: TableIdentifier): CatalogTable +``` + +`getTableMetadata` [getTableRawMetadata](#getTableRawMetadata) and replaces `CharType` and `VarcharType` field types with `StringType` in the table schema, recursively. + +!!! note "`CharType` and `VarcharType` Unsupported" + The Spark SQL query engine does not support char/varchar types yet. diff --git a/docs/logical-operators/TruncateTableCommand.md b/docs/logical-operators/TruncateTableCommand.md index c89425d5b1d..858c6d91b63 100644 --- a/docs/logical-operators/TruncateTableCommand.md +++ b/docs/logical-operators/TruncateTableCommand.md @@ -17,35 +17,47 @@ title: TruncateTableCommand * [ResolveSessionCatalog](../logical-analysis-rules/ResolveSessionCatalog.md) logical resolution rule is executed - +`run` throws an `AnalysisException` when executed with the [TablePartitionSpec](#partitionSpec) with filesource partition disabled or partition metadata not in a Hive metastore.