@Test
  public void testDeleteAndQueryByAlias() {
    try {
      prepareTimeseries();
      List<ITimeSeriesSchemaInfo> result =
          SchemaRegionTestUtil.showTimeseries(
              schemaRegion, new PartialPath("root.sg.wf01.wt01.v1.temp"));
      Assert.assertEquals(1, result.size());
      // Delete timeseries
      final PathPatternTree patternTree = new PathPatternTree();
      patternTree.appendFullPath(new PartialPath("root.sg.wf01.wt01.v1.temp"));
      patternTree.constructTree();
      Assert.assertTrue(schemaRegion.constructSchemaBlackList(patternTree).getLeft() >= 1);
      schemaRegion.deleteTimeseriesInBlackList(patternTree);
      result =
          SchemaRegionTestUtil.showTimeseries(
              schemaRegion, new PartialPath("root.sg.wf01.wt01.v1.temp"));
      Assert.assertEquals(0, result.size());
    } catch (final Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail(e.getMessage());
    }
  }
Prepare timeseries

<p>"root.sg.wf01.wt01.v1.s1" without tags, attributes and alias

<p>"root.sg.wf01.wt01.v1.s2" with tags, attributes and alias

<p>"root.sg.wf01.aligned_device1.(s1,s2)" aligned without tags, attributes and alias

<p>"root.sg.wf01.aligned_device2.(s1,s2)" aligned with tags, attributes and alias
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/metadata/schemaRegion/SchemaRegionAliasAndTagTest.java