Search in sources :

Example 6 with QueryResultColumn

use of com.thinkbiganalytics.discovery.schema.QueryResultColumn in project kylo by Teradata.

the class DefaultQueryResult method setColumns.

@Override
public void setColumns(List<QueryResultColumn> columns) {
    this.columns = columns;
    this.columnFieldMap = new HashMap<>();
    this.columnDisplayNameMap = new HashMap<>();
    if (columns != null) {
        int index = 0;
        for (QueryResultColumn column : columns) {
            column.setIndex(index);
            columnFieldMap.put(column.getField(), column);
            columnDisplayNameMap.put(column.getDisplayName(), column);
            index++;
        }
    }
}
Also used : QueryResultColumn(com.thinkbiganalytics.discovery.schema.QueryResultColumn)

Aggregations

QueryResultColumn (com.thinkbiganalytics.discovery.schema.QueryResultColumn)6 DefaultQueryResultColumn (com.thinkbiganalytics.discovery.model.DefaultQueryResultColumn)4 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 LinkedHashMap (java.util.LinkedHashMap)2 DefaultField (com.thinkbiganalytics.discovery.model.DefaultField)1 DefaultHiveSchema (com.thinkbiganalytics.discovery.model.DefaultHiveSchema)1 DefaultQueryResult (com.thinkbiganalytics.discovery.model.DefaultQueryResult)1 Field (com.thinkbiganalytics.discovery.schema.Field)1 ResultSet (java.sql.ResultSet)1 SQLException (java.sql.SQLException)1 List (java.util.List)1 Map (java.util.Map)1 Nonnull (javax.annotation.Nonnull)1 DataType (org.apache.spark.sql.types.DataType)1 MetadataBuilder (org.apache.spark.sql.types.MetadataBuilder)1 StructField (org.apache.spark.sql.types.StructField)1 StructType (org.apache.spark.sql.types.StructType)1 DataRetrievalFailureException (org.springframework.dao.DataRetrievalFailureException)1 RowCallbackHandler (org.springframework.jdbc.core.RowCallbackHandler)1