Skip to content

Commit e0c7e55

Browse files
DescribeColumnCommand Logical Command
1 parent 85c9a22 commit e0c7e55

File tree

1 file changed

+19
-25
lines changed

1 file changed

+19
-25
lines changed

docs/logical-operators/DescribeColumnCommand.md

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ title: DescribeColumnCommand
44

55
# DescribeColumnCommand Logical Command
66

7+
`DescribeColumnCommand` is a [LeafRunnableCommand](LeafRunnableCommand.md) that represents a `DescribeColumn` logical operator with the default [spark_catalog](../connector/catalog/CatalogManager.md#SESSION_CATALOG_NAME) at execution.
8+
9+
## Creating Instance
10+
11+
`DescribeColumnCommand` takes the following to be created:
12+
13+
* <span id="table"> `TableIdentifier`
14+
* <span id="colNameParts"> Column Name Parts
15+
* <span id="isExtended"> `isExtended` flag
16+
* <span id="output"> Output [Attribute](../expressions/Attribute.md)s
17+
18+
`DescribeColumnCommand` is created when:
19+
20+
* [ResolveSessionCatalog](../logical-analysis-rules/ResolveSessionCatalog.md) logical resolution rule is executed (to resolve `DescribeColumn` logical operators with the default [spark_catalog](../connector/catalog/CatalogManager.md#SESSION_CATALOG_NAME))
21+
22+
<!---
23+
## Review Me
24+
725
`DescribeColumnCommand` is a RunnableCommand.md[logical command] for spark-sql-SparkSqlAstBuilder.md#DescribeColumnCommand[DESCRIBE TABLE] SQL command with a single column only (i.e. no `PARTITION` specification).
826
927
```text
@@ -67,12 +85,6 @@ scala> spark.sql(descExtSQL).show
6785
+--------------+----------+
6886
```
6987
70-
[[output]]
71-
`DescribeColumnCommand` defines the Command.md#output[output schema] with the following columns:
72-
73-
* `info_name` with "name of the column info" comment
74-
* `info_value` with "value of the column info" comment
75-
7688
## describeTable Labeled Alternative { #describeTable }
7789
7890
`DescribeColumnCommand` is described by `describeTable` labeled alternative in `statement` expression in [SqlBaseParser.g4](../sql/AstBuilder.md#grammar) and parsed using [SparkSqlParser](../sql/SparkSqlParser.md#visitDescribeTable).
@@ -115,22 +127,4 @@ If `DescribeColumnCommand` command was executed with <<isExtended, EXTENDED or F
115127
. <<histogramDescription, histogram>>
116128
117129
`run` gives `NULL` for the value of the comment and statistics if not available.
118-
119-
=== [[histogramDescription]] `histogramDescription` Internal Method
120-
121-
[source, scala]
122-
----
123-
histogramDescription(histogram: Histogram): Seq[Row]
124-
----
125-
126-
`histogramDescription`...FIXME
127-
128-
NOTE: `histogramDescription` is used exclusively when `DescribeColumnCommand` is <<run, executed>> with `EXTENDED` or `FORMATTED` option turned on.
129-
130-
=== [[creating-instance]] Creating DescribeColumnCommand Instance
131-
132-
`DescribeColumnCommand` takes the following when created:
133-
134-
* [[table]] `TableIdentifier`
135-
* [[colNameParts]] Column name
136-
* [[isExtended]] `isExtended` flag that indicates whether spark-sql-SparkSqlAstBuilder.md#DescribeColumnCommand[EXTENDED or FORMATTED option] was used or not
130+
-->

0 commit comments

Comments
 (0)