Class TPCDSUtils
- java.lang.Object
-
- com.amazonaws.athena.connectors.tpcds.TPCDSUtils
-
public class TPCDSUtils extends Object
Utility class that centralizes a few commonly used tools for working with the TPC-DS Tables,Columns,Schemas.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.arrow.vector.types.pojo.Field
convertColumn(com.teradata.tpcds.column.Column column)
Converts from TPCDS columns to Apache Arrow fields.static int
extractScaleFactor(String schemaName)
Extracts the scale factor of the schema from its name.static com.teradata.tpcds.Table
validateQptTable(Map<String,String> query)
Required that the requested Table be present in the TPCDS generated schema And For Query Passthrough; only support ONE table per select statement; And should only be used for testing.static com.teradata.tpcds.Table
validateTable(TableName tableName)
Required that the requested Table be present in the TPCDS generated schema.
-
-
-
Method Detail
-
convertColumn
public static org.apache.arrow.vector.types.pojo.Field convertColumn(com.teradata.tpcds.column.Column column)
Converts from TPCDS columns to Apache Arrow fields.- Parameters:
column
- The TPCDS column to conver.- Returns:
- The Apache Arrow field that corresponds to the TPCDS column.
-
extractScaleFactor
public static int extractScaleFactor(String schemaName)
Extracts the scale factor of the schema from its name.- Parameters:
schemaName
- The schema name from which to extract a scale factor.- Returns:
- The scale factor associated with the schema name. Method throws is the scale factor can not be determined.
-
validateTable
public static com.teradata.tpcds.Table validateTable(TableName tableName)
Required that the requested Table be present in the TPCDS generated schema.- Parameters:
tableName
- The fully qualified name of the requested table.- Returns:
- The TPCDS table, if present, otherwise the method throws.
-
validateQptTable
public static com.teradata.tpcds.Table validateQptTable(Map<String,String> query)
Required that the requested Table be present in the TPCDS generated schema And For Query Passthrough; only support ONE table per select statement; And should only be used for testing.- Parameters:
query
- Query Passthrough- Returns:
- The TPCDS table, if present, otherwise the method throws.
-
-