private SchemaFilter parseDevicesWhereClause(IoTDBSqlParser.DevicesWhereClauseContext ctx) {
    // path contains filter
    if (ctx.deviceContainsExpression() != null) {
      return SchemaFilterFactory.createPathContainsFilter(
          parseStringLiteral(ctx.deviceContainsExpression().value.getText()));
    } else {
      String templateName = null;
      boolean isEqual = true;
      if (ctx.templateEqualExpression().operator_is() != null) {
        if (ctx.templateEqualExpression().operator_not() != null) {
          isEqual = false;
        }
      } else {
        templateName = parseStringLiteral(ctx.templateEqualExpression().templateName.getText());
        if (ctx.templateEqualExpression().OPERATOR_NEQ() != null) {
          isEqual = false;
        }
      }
      return SchemaFilterFactory.createTemplateNameFilter(templateName, isEqual);
    }
  }
Check and set datatype, encoding, compressor.

@throws SemanticException if encoding or dataType meets error handling
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java