stoty commented on a change in pull request #1097: URL: https://github.com/apache/phoenix/pull/1097#discussion_r564252606
########## File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexAsyncThresholdIT.java ########## @@ -69,51 +70,52 @@ private final boolean overThreshold; private final Mode mode; - enum Mode{ + enum Mode { NORMAL, ASYNC, COVERED, FUNCTIONAL - } + } public IndexAsyncThresholdIT(Long threshold, Long rows, Long columns, Long overThreshold, Long mode) - throws Exception { + throws Exception { this.tableName = generateUniqueName(); this.rows = rows; this.columns = columns; this.overThreshold = overThreshold == 0; this.mode = mode.equals(0L) ? Mode.NORMAL : - mode.equals(1L) ? Mode.ASYNC : - mode.equals(2L) ? Mode.COVERED : - Mode.FUNCTIONAL; + mode.equals(1L) ? Mode.ASYNC : + mode.equals(2L) ? Mode.COVERED : + Mode.FUNCTIONAL; } @Parameterized.Parameters - public static synchronized Collection<Long[]> primeNumbers() { + public static synchronized Collection<Long[]> primeNumbers() { return Arrays.asList(new Long[][]{ - {100000L, 5000L, 10L, 0L, 0L}, - {Long.MAX_VALUE, 200L, 100L, 1L, 0L}, - {0L, 20L, 10L, 1L, 0L}, - {1L, 20L, 10L, 1L, 1L}, - {1L, 20L, 10L, 0L, 2L}, - {1L, 100L, 10L, 0L, 3L}, + {100000L, 5000L, 10L, 0L, 0L}, Review comment: Your autoformatter doesn't seem to be set up right. Continuation lines should either be matched to the previous expression, or use 8 spaces, not 4. ########## File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexAsyncThresholdIT.java ########## @@ -163,29 +164,28 @@ else if(this.mode == Mode.COVERED){ PMetaData metaCache = connection.unwrap(PhoenixConnection.class).getMetaDataCache(); List<PTable> indexes = metaCache.getTableRef(key).getTable().getIndexes(); if (!overThreshold) { - if(this.mode == Mode.ASYNC){ + if (this.mode == Mode.ASYNC) { assertEquals(PIndexState.BUILDING, indexes.get(0).getIndexState()); - } - else { + } else { assertEquals(PIndexState.ACTIVE, indexes.get(0).getIndexState()); } assertNull(exception); } else { assertEquals(0, indexes.size()); assertNotNull(exception); assertEquals(exception.getErrorCode(), - SQLExceptionCode.ABOVE_INDEX_NON_ASYNC_THRESHOLD.getErrorCode()); + SQLExceptionCode.ABOVE_INDEX_NON_ASYNC_THRESHOLD.getErrorCode()); } } } private void createAndPopulateTable(Connection conn, String fullTableName, Long rows, Long columns) - throws SQLException { + throws SQLException { Statement stmt = conn.createStatement(); StringBuilder ddl = new StringBuilder("CREATE TABLE " + fullTableName - + " (col1 varchar primary key"); - for (int i = 2; i< columns; i++){ + + " (col1 varchar primary key"); Review comment: indent 8 here too ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org