apache / paimon-rust

Apache Paimon Rust The rust implementation of Apache Paimon.
https://paimon.apache.org/
Apache License 2.0
105 stars 32 forks source link

Implement ManifestFileMeta test fixtures #54

Closed devillove084 closed 3 months ago

devillove084 commented 3 months ago
package org.apache.paimon.manifest;

import org.apache.paimon.types.RowType;
import org.junit.jupiter.api.Test;

import java.io.File;

public class ManifestFileMetaJsonTest {

    @Test
    void testGenerateManifestFileMetaSchemaJson() {
        // static method
        RowType schema = ManifestFileMeta.schema();

        String directoryPath = "/tmp/fixtures";
        String fileName = "manifest_file_meta_schema.json";

        File directory = new File(directoryPath);
        if (!directory.exists()) {
            directory.mkdirs();
        }

        String filePath = directoryPath + "/" + fileName;

        JsonUtil.writeDataTypeToJson(schema, filePath);

        System.out.println("Generated JSON for ManifestFileMeta schema: " + filePath);
    }
}

cc @Xuanwo