baremaps-calcite/src/main/java/org/apache/baremaps/calcite/BaremapsDdlExecutor.java [331:370]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          throw SqlUtil.newContextException(drop.name.getParserPosition(),
              RESOURCE.viewNotFound(objectName));
        }
        break;
      case DROP_TYPE:
        existed = schema != null && schema.removeType(objectName);
        if (!existed && !drop.ifExists) {
          throw SqlUtil.newContextException(drop.name.getParserPosition(),
              RESOURCE.typeNotFound(objectName));
        }
        break;
      case DROP_FUNCTION:
        existed = schema != null && schema.removeFunction(objectName);
        if (!existed && !drop.ifExists) {
          throw SqlUtil.newContextException(drop.name.getParserPosition(),
              RESOURCE.functionNotFound(objectName));
        }
        break;
      case OTHER_DDL:
      default:
        throw new AssertionError(drop.getKind());
    }
  }

  /**
   * Executes a {@code TRUNCATE TABLE} command.
   */
  public void execute(SqlTruncateTable truncate,
      CalcitePrepare.Context context) {
    final SchemaInfo schemaInfo =
        schema(context, true, truncate.name);
    if (schemaInfo.schema() == null
        || schemaInfo.schema().plus().getTable(schemaInfo.name()) == null) {
      throw SqlUtil.newContextException(truncate.name.getParserPosition(),
          RESOURCE.tableNotFound(schemaInfo.name()));
    }

    if (!truncate.continueIdentify) {
      // Calcite not support RESTART IDENTIFY
      throw new UnsupportedOperationException("RESTART IDENTIFY is not supported");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



baremaps-calcite/src/main/java/org/apache/baremaps/calcite/postgres/PostgresDdlExecutor.java [415:454]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          throw SqlUtil.newContextException(drop.name.getParserPosition(),
              RESOURCE.viewNotFound(objectName));
        }
        break;
      case DROP_TYPE:
        existed = schema != null && schema.removeType(objectName);
        if (!existed && !drop.ifExists) {
          throw SqlUtil.newContextException(drop.name.getParserPosition(),
              RESOURCE.typeNotFound(objectName));
        }
        break;
      case DROP_FUNCTION:
        existed = schema != null && schema.removeFunction(objectName);
        if (!existed && !drop.ifExists) {
          throw SqlUtil.newContextException(drop.name.getParserPosition(),
              RESOURCE.functionNotFound(objectName));
        }
        break;
      case OTHER_DDL:
      default:
        throw new AssertionError(drop.getKind());
    }
  }

  /**
   * Executes a {@code TRUNCATE TABLE} command.
   */
  public void execute(SqlTruncateTable truncate,
      CalcitePrepare.Context context) {
    final SchemaInfo schemaInfo =
        schema(context, true, truncate.name);
    if (schemaInfo.schema() == null
        || schemaInfo.schema().plus().getTable(schemaInfo.name()) == null) {
      throw SqlUtil.newContextException(truncate.name.getParserPosition(),
          RESOURCE.tableNotFound(schemaInfo.name()));
    }

    if (!truncate.continueIdentify) {
      // Calcite not support RESTART IDENTIFY
      throw new UnsupportedOperationException("RESTART IDENTIFY is not supported");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



