@Test public void testReadWrite() throws Exception { execute("SELECT * from vgroup3 where x = 'one'", Arrays.asList("one", "zne")); ByteArrayOutputStream baos = new ByteArrayOutputStream(); String matTableName = RelationalPlanner.MAT_PREFIX + "MATVIEW.VGROUP3"; this.globalStore.getState(matTableName, baos); MatTableInfo matTableInfo = this.globalStore.getMatTableInfo(matTableName); long time = matTableInfo.getUpdateTime(); this.globalStore.failedLoad(matTableName); this.globalStore.setState(matTableName, new ByteArrayInputStream(baos.toByteArray())); assertEquals(time, matTableInfo.getUpdateTime()); execute("SELECT * from vgroup3 where x = 'one'", Arrays.asList("one", "zne")); execute("select lookup('mattable.info', 'e1', 'e2', 5)", Arrays.asList((String)null)); baos = new ByteArrayOutputStream(); String codeTableName = "#CODE_MATTABLE.INFO.E2.E1"; this.globalStore.getState(codeTableName, baos); this.globalStore.setState(codeTableName, new ByteArrayInputStream(baos.toByteArray())); }