Source:
@Test public void testAlterViewWithNoPhoenixTTLSucceed() throws Exception { long startTime = EnvironmentEdgeManager.currentTimeMillis(); final SchemaBuilder schemaBuilder = createLevel2TenantViewWithTenantLevelTTL(null, null); String tenantId = schemaBuilder.getDataOptions().getTenantId(); String schemaName = stripQuotes(SchemaUtil .getSchemaNameFromFullName(schemaBuilder.getEntityTenantViewName())); String globalViewName = stripQuotes(SchemaUtil .getTableNameFromFullName(schemaBuilder.getEntityGlobalViewName())); String tenantViewName = stripQuotes(SchemaUtil .getTableNameFromFullName(schemaBuilder.getEntityTenantViewName())); String indexOnGlobalViewName = String.format("IDX_%s", globalViewName); String indexOnTenantViewName = String.format("IDX_%s", stripQuotes(schemaBuilder.getEntityKeyPrefix())); assertViewHeaderRowsHavePhoenixTTLRelatedCells( schemaBuilder.getTableOptions().getSchemaName(), startTime, false, 2); assertSyscatHavePhoenixTTLRelatedColumns(tenantId, schemaName, tenantViewName, PTableType.VIEW.getSerializedValue(), 300000); assertSyscatHavePhoenixTTLRelatedColumns(tenantId, schemaName, indexOnTenantViewName, PTableType.INDEX.getSerializedValue(), 300000); try (Connection connection = DriverManager.getConnection(getUrl())) { try (Statement stmt = connection.createStatement()) { String sql = String.format(ALTER_SQL_WITH_NO_TTL, schemaName, globalViewName, "COL_30"); stmt.execute(sql); } } catch (SQLException e) { fail(); } String tenantURL = getUrl() + ';' + TENANT_ID_ATTRIB + '=' + tenantId; try (Connection connection = DriverManager.getConnection(tenantURL)) { try (Statement stmt = connection.createStatement()) { String sql = String.format(ALTER_SQL_WITH_NO_TTL, schemaName, tenantViewName, "COL_100"); stmt.execute(sql); } } catch (SQLException e) { fail(); } }

Target:
@Test public void testAlterViewWithNoPhoenixTTLSucceed() throws Exception { long startTime = EnvironmentEdgeManager.currentTimeMillis(); final SchemaBuilder schemaBuilder = createLevel2TenantViewWithTenantLevelTTL(null, null); String tenantId = schemaBuilder.getDataOptions().getTenantId(); String schemaName = stripQuotes( SchemaUtil.getSchemaNameFromFullName(schemaBuilder.getEntityTenantViewName())); String globalViewName = stripQuotes( SchemaUtil.getTableNameFromFullName(schemaBuilder.getEntityGlobalViewName())); String tenantViewName = stripQuotes( SchemaUtil.getTableNameFromFullName(schemaBuilder.getEntityTenantViewName())); String indexOnGlobalViewName = String.format("IDX_%s", globalViewName); String indexOnTenantViewName = String .format("IDX_%s", stripQuotes(schemaBuilder.getEntityKeyPrefix())); assertViewHeaderRowsHavePhoenixTTLRelatedCells( schemaBuilder.getTableOptions().getSchemaName(), startTime, false, 2); assertSyscatHavePhoenixTTLRelatedColumns(tenantId, schemaName, tenantViewName, PTableType.VIEW.getSerializedValue(), 300000); assertSyscatHavePhoenixTTLRelatedColumns(tenantId, schemaName, indexOnTenantViewName, PTableType.INDEX.getSerializedValue(), 300000); try (Connection connection = DriverManager.getConnection(getUrl())) { try (Statement stmt = connection.createStatement()) { String sql = String .format(ALTER_SQL_WITH_NO_TTL, schemaName, globalViewName, "COL_30"); stmt.execute(sql); } } String tenantURL = getUrl() + ';' + TENANT_ID_ATTRIB + '=' + tenantId; try (Connection connection = DriverManager.getConnection(tenantURL)) { try (Statement stmt = connection.createStatement()) { String sql = String .format(ALTER_SQL_WITH_NO_TTL, schemaName, tenantViewName, "COL_100"); stmt.execute(sql); } } }