presto-connector/src/main/java/com/facebook/presto/maxcompute/MaxComputeMetadata.java [63:102]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        this.odps = MaxComputeUtils.getOdps(requireNonNull(config, "config is null"));
        this.supportSchema = MaxComputeUtils.supportSchema(config);
        this.metaCache = new MaxComputeMetaCache(config);
    }

    @Override
    public boolean schemaExists(ConnectorSession session, String schemaName)
    {
        if (!supportSchema || schemaName.equals(DEFAULT_SCHEMA)) {
            // non schema model ignore schema
            return true;
        }
        try {
            return odps.schemas().exists(schemaName);
        }
        catch (OdpsException e) {
            throw MaxComputeUtils.wrapOdpsException(e);
        }
    }

    @Override
    public List<String> listSchemaNames(ConnectorSession session)
    {
        return listSchemaNames();
    }

    public List<String> listSchemaNames()
    {
        if (!supportSchema) {
            return ImmutableList.of(DEFAULT_SCHEMA);
        }
        // TODO: use cache
        ImmutableList.Builder<String> builder = ImmutableList.builder();
        for (Schema schema : odps.schemas()) {
            builder.add(schema.getName());
        }
        return builder.build();
    }

    @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



trino-connector/src/main/java/io/trino/plugin/maxcompute/MaxComputeMetadata.java [61:100]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        this.odps = MaxComputeUtils.getOdps(requireNonNull(config, "config is null"));
        this.supportSchema = MaxComputeUtils.supportSchema(config);
        this.metaCache = new MaxComputeMetaCache(config);
    }

    @Override
    public boolean schemaExists(ConnectorSession session, String schemaName)
    {
        if (!supportSchema || schemaName.equals(DEFAULT_SCHEMA)) {
            // non schema model ignore schema
            return true;
        }
        try {
            return odps.schemas().exists(schemaName);
        }
        catch (OdpsException e) {
            throw MaxComputeUtils.wrapOdpsException(e);
        }
    }

    @Override
    public List<String> listSchemaNames(ConnectorSession session)
    {
        return listSchemaNames();
    }

    public List<String> listSchemaNames()
    {
        if (!supportSchema) {
            return ImmutableList.of(DEFAULT_SCHEMA);
        }
        // TODO: use cache
        ImmutableList.Builder<String> builder = ImmutableList.builder();
        for (Schema schema : odps.schemas()) {
            builder.add(schema.getName());
        }
        return builder.build();
    }

    @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



