hive-protolib/src/main/java/com/streamsets/pipeline/stage/lib/hive/HiveQueryExecutor.java
public Pair<LinkedHashMap<String, HiveTypeInfo>, LinkedHashMap<String, HiveTypeInfo>> executeDescTableQuery(
      String qualifiedTableName
  ) throws StageException {
    String sql = buildDescTableQuery(qualifiedTableName);

    return executeQuery(sql, new WithResultSet<Pair<LinkedHashMap<String, HiveTypeInfo>, LinkedHashMap<String, HiveTypeInfo>>>() {
      @Override
      public Pair<LinkedHashMap<String, HiveTypeInfo>, LinkedHashMap<String, HiveTypeInfo>> run(ResultSet rs) throws SQLException, StageException {
        LinkedHashMap<String, HiveTypeInfo> columnTypeInfo  = extractTypeInfo(rs);
        processDelimiter(rs, "#");
        processDelimiter(rs, "#");
        processDelimiter(rs, "");
        LinkedHashMap<String, HiveTypeInfo> partitionTypeInfo = extractTypeInfo(rs);
        //Remove partition columns from the columns map.
        for (String partitionCol : partitionTypeInfo.keySet()) {
          columnTypeInfo.remove(partitionCol);
        }
        return Pair.of(columnTypeInfo, partitionTypeInfo);
      }
    });
  }
public Pair<LinkedHashMap<String, HiveTypeInfo>, LinkedHashMap<String, HiveTypeInfo>> executeDescTableQuery(
      String qualifiedTableName
  ) throws StageException {
    String sql = buildDescTableQuery(qualifiedTableName);

    return executeQuery(sql, new WithResultSet<Pair<LinkedHashMap<String, HiveTypeInfo>, LinkedHashMap<String, HiveTypeInfo>>>() {
      @Override
      public Pair<LinkedHashMap<String, HiveTypeInfo>, LinkedHashMap<String, HiveTypeInfo>> run(ResultSet rs) throws SQLException, StageException {
        LinkedHashMap<String, HiveTypeInfo> columnTypeInfo  = extractTypeInfo(rs);
        processDelimiter(rs, "#");
        processDelimiter(rs, "#");
        processDelimiter(rs, "");
        LinkedHashMap<String, HiveTypeInfo> partitionTypeInfo = extractTypeInfo(rs);
        //Remove partition columns from the columns map.
        for (String partitionCol : partitionTypeInfo.keySet()) {
          columnTypeInfo.remove(partitionCol);
        }
        return Pair.of(columnTypeInfo, partitionTypeInfo);
      }
    });
  }
public Pair < LinkedHashMap < String , HiveTypeInfo > , LinkedHashMap < String , HiveTypeInfo > > executeDescTableQuery ( String qualifiedTableName ) throws StageException { String sql = buildDescTableQuery ( qualifiedTableName ) ; return executeQuery ( sql , new WithResultSet < Pair < LinkedHashMap < String , HiveTypeInfo > , LinkedHashMap < String , HiveTypeInfo > > > ( ) { @ Override public Pair < LinkedHashMap < String , HiveTypeInfo > , LinkedHashMap < String , HiveTypeInfo > > run ( ResultSet rs ) throws SQLException , StageException { LinkedHashMap < String , HiveTypeInfo > columnTypeInfo = extractTypeInfo ( rs ) ; processDelimiter ( rs , "#" ) ; processDelimiter ( rs , "#" ) ; processDelimiter ( rs , "" ) ; LinkedHashMap < String , HiveTypeInfo > partitionTypeInfo = extractTypeInfo ( rs ) ; //Remove partition columns from the columns map. for ( String partitionCol : partitionTypeInfo . keySet ( ) ) { columnTypeInfo . remove ( partitionCol ) ; } return Pair . of ( columnTypeInfo , partitionTypeInfo ) ; } } ) ; }
Returns {@link Pair} of Column Type Info and Partition Type Info.
@param qualifiedTableName qualified table name.
@return {@link Pair} of Column Type Info and Partition Type Info.
@throws StageException in case of any {@link SQLException}
Returns {