Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
huaxingao committed Aug 16, 2021
1 parent a84794c commit b89b321
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.spark.sql.connector.catalog.index;

import java.util.Collections;
import java.util.Map;

import org.apache.spark.annotation.Evolving;
import org.apache.spark.sql.connector.catalog.Identifier;
import org.apache.spark.sql.connector.expressions.FieldReference;

import java.util.Collections;
import java.util.Map;

/**
* An Index in a table
*
Expand All @@ -32,21 +32,21 @@
@Evolving
public class Index {
private String indexName;
private FieldReference[] columns;
private Identifier table;
private String indexType;
private Identifier table;
private FieldReference[] columns;
private Map<String, String> properties = Collections.emptyMap();

public Index(
String indexName,
FieldReference[] columns,
Identifier table,
String indexType,
Identifier table,
FieldReference[] columns,
Map<String, String> properties) {
this.indexName = indexName;
this.columns = columns;
this.table = table;
this.indexType = indexType;
this.table = table;
this.columns = columns;
this.properties = properties;
}

Expand All @@ -56,19 +56,19 @@ public Index(
String indexName() { return indexName; }

/**
* @return the column(s) this Index is on. Could be multi columns (a multi-column index).
* @return the indexType of this Index.
*/
FieldReference[] columns() { return columns; }
String indexType() { return indexType; }

/**
* @return the table this Index is on.
*/
Identifier table() { return table; }

/**
* @return the indexType of this Index.
* @return the column(s) this Index is on. Could be multi columns (a multi-column index).
*/
String indexType() { return indexType; }
FieldReference[] columns() { return columns; }

/**
* Returns the string map of index properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

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;
import org.apache.spark.sql.catalyst.analysis.NoSuchIndexException;
Expand All @@ -25,9 +28,6 @@
import org.apache.spark.sql.connector.catalog.Identifier;
import org.apache.spark.sql.connector.expressions.FieldReference;

import java.util.Map;
import java.util.Properties;

/**
* Catalog methods for working with index
*
Expand Down Expand Up @@ -63,7 +63,8 @@ void createIndex(String indexName,
* @throws NoSuchIndexException If the index does not exist (optional)
* @throws UnsupportedOperationException If delete index is not a supported operation
*/
default boolean deleteIndex(String indexName) throws UnsupportedOperationException {
default boolean deleteIndex(String indexName)
throws NoSuchIndexException, UnsupportedOperationException {
throw new UnsupportedOperationException("Delete index is not supported.");
}

Expand Down

0 comments on commit b89b321

Please sign in to comment.