hive-protolib/src/main/java/com/streamsets/pipeline/stage/lib/hive/HiveQueryExecutor.java
public Pair<Boolean, Boolean> executeShowTBLPropertiesQuery(
      String qualifiedTableName
  ) throws StageException {
    String sql = String.format(SHOW_TBLPROPERTIES, qualifiedTableName);

    return executeQuery(sql, new WithResultSet<Pair<Boolean, Boolean>>() {
      @Override
      public Pair<Boolean, Boolean> run(ResultSet rs) throws SQLException {
        boolean isExternal = false, useAsAvro = true;

        while (rs.next()) {
          String propName = rs.getString(RESULT_SET_PROP_NAME);
          String propValue = rs.getString(RESULT_SET_PROP_VALUE);
          if (propName.toUpperCase().equals(EXTERNAL)) {
            isExternal = Boolean.valueOf(propValue);
          } else if (propName.equals(AVRO_SCHEMA_URL)) {
            useAsAvro = false;
          }
        }
        return Pair.of(isExternal, useAsAvro);
      }
    });
  }
public Pair<Boolean, Boolean> executeShowTBLPropertiesQuery(
      String qualifiedTableName
  ) throws StageException {
    String sql = String.format(SHOW_TBLPROPERTIES, qualifiedTableName);

    return executeQuery(sql, new WithResultSet<Pair<Boolean, Boolean>>() {
      @Override
      public Pair<Boolean, Boolean> run(ResultSet rs) throws SQLException {
        boolean isExternal = false, useAsAvro = true;

        while (rs.next()) {
          String propName = rs.getString(RESULT_SET_PROP_NAME);
          String propValue = rs.getString(RESULT_SET_PROP_VALUE);
          if (propName.toUpperCase().equals(EXTERNAL)) {
            isExternal = Boolean.valueOf(propValue);
          } else if (propName.equals(AVRO_SCHEMA_URL)) {
            useAsAvro = false;
          }
        }
        return Pair.of(isExternal, useAsAvro);
      }
    });
  }
public Pair < Boolean , Boolean > executeShowTBLPropertiesQuery ( String qualifiedTableName ) throws StageException { String sql = String . format ( SHOW_TBLPROPERTIES , qualifiedTableName ) ; return executeQuery ( sql , new WithResultSet < Pair < Boolean , Boolean > > ( ) { @ Override public Pair < Boolean , Boolean > run ( ResultSet rs ) throws SQLException { boolean isExternal = false , useAsAvro = true ; while ( rs . next ( ) ) { String propName = rs . getString ( RESULT_SET_PROP_NAME ) ; String propValue = rs . getString ( RESULT_SET_PROP_VALUE ) ; if ( propName . toUpperCase ( ) . equals ( EXTERNAL ) ) { isExternal = Boolean . valueOf ( propValue ) ; } else if ( propName . equals ( AVRO_SCHEMA_URL ) ) { useAsAvro = false ; } } return Pair . of ( isExternal , useAsAvro ) ; } } ) ; }
Returns {@link Pair} of IsExternal and storedAsAvro TBLProperties.
@param qualifiedTableName qualified table name.
@return {@link Pair} of IsExternal and storedAsAvro.
@throws StageException in case of any {@link SQLException}
Returns {