@Test public void testConstructMetadataParamQuery() { String metadataParamQuery = IndexScrutinyTableOutput .constructMetadataParamQuery(Arrays.asList("INVALID_ROWS_QUERY_ALL")); assertEquals( "SELECT \"INVALID_ROWS_QUERY_ALL\" FROM PHOENIX_INDEX_SCRUTINY_METADATA WHERE (\"SOURCE_TABLE\",\"TARGET_TABLE\",\"SCRUTINY_EXECUTE_TIME\") IN ((?,?,?))", metadataParamQuery); }
static String constructMetadataParamQuery(List<String> metadataSelectCols) { String pkColsCsv = getPksCsv(); String query = QueryUtil.constructSelectStatement(OUTPUT_METADATA_TABLE_NAME, metadataSelectCols, pkColsCsv, null, true); String inClause = " IN " + QueryUtil.constructParameterizedInClause(3, 1); return query + inClause; }
IndexScrutinyTableOutput { static String constructMetadataParamQuery(List<String> metadataSelectCols) { String pkColsCsv = getPksCsv(); String query = QueryUtil.constructSelectStatement(OUTPUT_METADATA_TABLE_NAME, metadataSelectCols, pkColsCsv, null, true); String inClause = " IN " + QueryUtil.constructParameterizedInClause(3, 1); return query + inClause; } }
IndexScrutinyTableOutput { static String constructMetadataParamQuery(List<String> metadataSelectCols) { String pkColsCsv = getPksCsv(); String query = QueryUtil.constructSelectStatement(OUTPUT_METADATA_TABLE_NAME, metadataSelectCols, pkColsCsv, null, true); String inClause = " IN " + QueryUtil.constructParameterizedInClause(3, 1); return query + inClause; }  }
IndexScrutinyTableOutput { static String constructMetadataParamQuery(List<String> metadataSelectCols) { String pkColsCsv = getPksCsv(); String query = QueryUtil.constructSelectStatement(OUTPUT_METADATA_TABLE_NAME, metadataSelectCols, pkColsCsv, null, true); String inClause = " IN " + QueryUtil.constructParameterizedInClause(3, 1); return query + inClause; }  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 { static String constructMetadataParamQuery(List<String> metadataSelectCols) { String pkColsCsv = getPksCsv(); String query = QueryUtil.constructSelectStatement(OUTPUT_METADATA_TABLE_NAME, metadataSelectCols, pkColsCsv, null, true); String inClause = " IN " + QueryUtil.constructParameterizedInClause(3, 1); return query + inClause; }  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; }