public static class ListBucketingPruner.DynamicMultiDimensionalCollection extends Object
ListBucketingPruner.prune(org.apache.hadoop.hive.ql.parse.ParseContext, org.apache.hadoop.hive.ql.metadata.Partition, org.apache.hadoop.hive.ql.plan.ExprNodeDesc)
We will use a HasMap to represent the Dynamic-Multiple-Dimension collection:
1. Key is ListConstructor and Description |
---|
DynamicMultiDimensionalCollection() |
Modifier and Type | Method and Description |
---|---|
static List<List<String>> |
flat(List<List<String>> uniqSkewedElements)
Flat a dynamic-multi-dimension collection.
|
static List<List<String>> |
generateCollection(List<List<String>> values)
Find out complete skewed-element collection
For example:
1.
|
static List<List<String>> |
uniqueElementsList(List<List<String>> values,
String defaultDirName)
Convert value to unique element list.
|
static List<List<String>> |
uniqueSkewedValueList(List<List<String>> values)
Convert value to unique skewed value list.
|
public static List<List<String>> generateCollection(List<List<String>> values) throws SemanticException
SemanticException
public static List<List<String>> uniqueElementsList(List<List<String>> values, String defaultDirName)
values
- skewed value listpublic static List<List<String>> uniqueSkewedValueList(List<List<String>> values)
ListBucketingPrunerUtils.evaluateExprOnCell(java.util.List<java.lang.String>, java.util.List<java.lang.String>, org.apache.hadoop.hive.ql.plan.ExprNodeDesc, java.util.List<java.util.List<java.lang.String>>)
For example:
1. skewed column (list): C1, C2, C3
2. skewed value (list of list): (1,a,x), (2,b,x), (1,c,x), (2,a,y)
Input: skewed value (list of list): (1,a,x), (2,b,x), (1,c,x), (2,a,y)
Output: Unique skewed value for each skewed column (list of list):
(1,2), (a,b,c), (x,y)
Output matches order of skewed column. Output can be read as:
C1 has unique skewed value list (1,2,)
C2 has unique skewed value list (a,b,c)
C3 has unique skewed value list (x,y)values
- skewed value listpublic static List<List<String>> flat(List<List<String>> uniqSkewedElements) throws SemanticException
uniqSkewedElements
- SemanticException
Copyright © 2019 The Apache Software Foundation. All rights reserved.