-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GSI/LSI pushdown support for Hive
* Check LSIs and GSIs for optimal pushdown key conditions if not both hash key and range key for the DynamoDB table are found in query predicate * Pull analyzer initialization outside methods * Update pushdown eligibleHiveType to include binary type since it is also allowed for primary key attributes according to [Amazon DynamoDB doc](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey) * Add unit tests for DynamoDBFilterPushdown.java
- Loading branch information
Showing
7 changed files
with
757 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
emr-dynamodb-hadoop/src/main/java/org/apache/hadoop/dynamodb/filter/DynamoDBIndexInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.apache.hadoop.dynamodb.filter; | ||
|
||
import com.amazonaws.services.dynamodbv2.model.KeySchemaElement; | ||
import com.amazonaws.services.dynamodbv2.model.Projection; | ||
import java.util.List; | ||
|
||
public class DynamoDBIndexInfo { | ||
|
||
private String indexName; | ||
|
||
private List<KeySchemaElement> indexSchema; | ||
private Projection indexProjection; | ||
|
||
public DynamoDBIndexInfo(String indexName, | ||
List<KeySchemaElement> indexSchema, | ||
Projection indexProjection) { | ||
this.indexName = indexName; | ||
this.indexSchema = indexSchema; | ||
this.indexProjection = indexProjection; | ||
} | ||
|
||
public String getIndexName() { | ||
return indexName; | ||
} | ||
|
||
public void setIndexName(String indexName) { | ||
this.indexName = indexName; | ||
} | ||
|
||
public List<KeySchemaElement> getIndexSchema() { | ||
return indexSchema; | ||
} | ||
|
||
public void setIndexSchema( | ||
List<KeySchemaElement> indexSchema) { | ||
this.indexSchema = indexSchema; | ||
} | ||
|
||
public Projection getIndexProjection() { | ||
return indexProjection; | ||
} | ||
|
||
public void setIndexProjection(Projection indexProjection) { | ||
this.indexProjection = indexProjection; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.