@Test public void testGetSqlQueryBadCoveredColVal() throws SQLException { SourceTargetColumnNames columnNames = new SourceTargetColumnNames.DataSourceColNames(pDataTable, pIndexTable); String query = IndexScrutinyTableOutput.getSqlQueryBadCoveredColVal(conn, columnNames, SCRUTINY_TIME_MILLIS); assertEquals("SELECT \"SOURCE_TABLE\" , \"TARGET_TABLE\" , \"SCRUTINY_EXECUTE_TIME\" , \"SOURCE_ROW_PK_HASH\" , \"SOURCE_TS\" , \"TARGET_TS\" , \"HAS_TARGET_ROW\" , \"BEYOND_MAX_LOOKBACK\" , \"ID\" , \"PK_PART2\" , \"NAME\" , \"ZIP\" , \":ID\" , \":PK_PART2\" , \"0:NAME\" , \"0:ZIP\" FROM PHOENIX_INDEX_SCRUTINY(\"ID\" INTEGER,\"PK_PART2\" TINYINT,\"NAME\" VARCHAR,\"ZIP\" BIGINT,\":ID\" INTEGER,\":PK_PART2\" TINYINT,\"0:NAME\" VARCHAR,\"0:ZIP\" BIGINT) WHERE (\"SOURCE_TABLE\",\"TARGET_TABLE\",\"SCRUTINY_EXECUTE_TIME\", \"HAS_TARGET_ROW\") IN (('TEST_SCHEMA.TEST_INDEX_COLUMN_NAMES_UTIL','TEST_SCHEMA.TEST_ICN_INDEX',1502908914193,true))", query); }
public static String getSqlQueryBadCoveredColVal(Connection conn, SourceTargetColumnNames columnNames, long scrutinyTimeMillis) throws SQLException { String paramQuery = getHasTargetRowQuery(conn, columnNames, scrutinyTimeMillis); return paramQuery.replaceFirst("\\?", "true"); }
IndexScrutinyTableOutput { public static String getSqlQueryBadCoveredColVal(Connection conn, SourceTargetColumnNames columnNames, long scrutinyTimeMillis) throws SQLException { String paramQuery = getHasTargetRowQuery(conn, columnNames, scrutinyTimeMillis); return paramQuery.replaceFirst("\\?", "true"); } }
IndexScrutinyTableOutput { public static String getSqlQueryBadCoveredColVal(Connection conn, SourceTargetColumnNames columnNames, long scrutinyTimeMillis) throws SQLException { String paramQuery = getHasTargetRowQuery(conn, columnNames, scrutinyTimeMillis); return paramQuery.replaceFirst("\\?", "true"); }  }
IndexScrutinyTableOutput { public static String getSqlQueryBadCoveredColVal(Connection conn, SourceTargetColumnNames columnNames, long scrutinyTimeMillis) throws SQLException { String paramQuery = getHasTargetRowQuery(conn, columnNames, scrutinyTimeMillis); return paramQuery.replaceFirst("\\?", "true"); }  static String constructOutputTableUpsert(List<String> sourceDynamicCols,
            List<String> targetDynamicCols, Connection connection); static String getSqlQueryAllInvalidRows(Connection conn,
            SourceTargetColumnNames columnNames, long scrutinyTimeMillis); static String getSqlQueryMissingTargetRows(Connection conn,
            SourceTargetColumnNames columnNames, long scrutinyTimeMillis); static String getSqlQueryBadCoveredColVal(Connection conn,
            SourceTargetColumnNames columnNames, long scrutinyTimeMillis); static String getSqlQueryBeyondMaxLookback(Connection conn,
    SourceTargetColumnNames columnNames, long scrutinyTimeMillis); static ResultSet queryMetadata(Connection conn, List<String> selectCols,
            String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis); static ResultSet queryAllLatestMetadata(Connection conn, String qSourceTableName,
                                                   String qTargetTableName); static ResultSet queryAllMetadata(Connection conn, String qSourceTableName,
            String qTargetTableName, long scrutinyTimeMillis); static void writeJobResults(Connection conn, String[] cmdLineArgs, List<Job> completedJobs); }
IndexScrutinyTableOutput { public static String getSqlQueryBadCoveredColVal(Connection conn, SourceTargetColumnNames columnNames, long scrutinyTimeMillis) throws SQLException { String paramQuery = getHasTargetRowQuery(conn, columnNames, scrutinyTimeMillis); return paramQuery.replaceFirst("\\?", "true"); }  static String constructOutputTableUpsert(List<String> sourceDynamicCols,
            List<String> targetDynamicCols, Connection connection); static String getSqlQueryAllInvalidRows(Connection conn,
            SourceTargetColumnNames columnNames, long scrutinyTimeMillis); static String getSqlQueryMissingTargetRows(Connection conn,
            SourceTargetColumnNames columnNames, long scrutinyTimeMillis); static String getSqlQueryBadCoveredColVal(Connection conn,
            SourceTargetColumnNames columnNames, long scrutinyTimeMillis); static String getSqlQueryBeyondMaxLookback(Connection conn,
    SourceTargetColumnNames columnNames, long scrutinyTimeMillis); static ResultSet queryMetadata(Connection conn, List<String> selectCols,
            String qSourceTableName, String qTargetTableName, long scrutinyTimeMillis); static ResultSet queryAllLatestMetadata(Connection conn, String qSourceTableName,
                                                   String qTargetTableName); static ResultSet queryAllMetadata(Connection conn, String qSourceTableName,
            String qTargetTableName, long scrutinyTimeMillis); static void writeJobResults(Connection conn, String[] cmdLineArgs, List<Job> completedJobs); static String OUTPUT_TABLE_NAME; static final String SCRUTINY_EXECUTE_TIME_COL_NAME; static final String TARGET_TABLE_COL_NAME; static final String SOURCE_TABLE_COL_NAME; static final String OUTPUT_TABLE_DDL; static final String OUTPUT_TABLE_BEYOND_LOOKBACK_DDL; static final String OUTPUT_METADATA_TABLE_NAME; static final String OUTPUT_METADATA_DDL; static final String OUTPUT_METADATA_BEYOND_LOOKBACK_COUNTER_DDL; static final String UPSERT_METADATA_SQL; }