-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-36895][SQL] Add Create Index syntax support #34148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
050f881
d3b39cc
c2b20b9
e773f55
74d607c
0ed3401
6f9347d
d6ac2aa
2e3788a
78f300f
7531b87
b619f7a
a8382e5
a4fa7c8
6b84f83
9d0781c
03c046b
b7801e4
e962ecb
a86503f
ab2908f
f871d26
2e066b3
a8cb845
fe0d4d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,6 @@ | |
| package org.apache.spark.sql.connector.catalog.index; | ||
|
|
||
| import java.util.Map; | ||
| import java.util.Properties; | ||
|
|
||
| import org.apache.spark.annotation.Evolving; | ||
| import org.apache.spark.sql.catalyst.analysis.IndexAlreadyExistsException; | ||
|
|
@@ -38,7 +37,8 @@ public interface SupportsIndex extends Table { | |
| * Creates an index. | ||
| * | ||
| * @param indexName the name of the index to be created | ||
| * @param indexType the IndexType of the index to be created | ||
| * @param indexType the type of the index to be created. If this is not specified, Spark | ||
| * will use empty String. | ||
|
||
| * @param columns the columns on which index to be created | ||
| * @param columnsProperties the properties of the columns on which index to be created | ||
| * @param properties the properties of the index to be created | ||
|
|
@@ -47,8 +47,8 @@ public interface SupportsIndex extends Table { | |
| void createIndex(String indexName, | ||
| String indexType, | ||
| NamedReference[] columns, | ||
| Map<NamedReference, Properties>[] columnsProperties, | ||
| Properties properties) | ||
| Map<NamedReference, Map<String, String>> columnsProperties, | ||
| Map<String, String> properties) | ||
| throws IndexAlreadyExistsException; | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious why
TABLEis optional here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the keyword
TABLE, not table name. Most of the DBMS don't include thisTABLEkeyword inCREATE INDEX, but Delta Lake has this optionalTABLEkeyword.CREATE BLOOMFILTER INDEX ON [TABLE] table_identifier [FOR COLUMNS(columnName1 [OPTIONS(..)], columnName2, ...)] [OPTIONS ( key1 [ = ] val1, key2 [ = ] val2, ... ) ]There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I understand this is a keyword, just not sure the reason why we make it optional instead of always requiring or not requiring it.