public static ClickHouseFile of(ClickHouseInputStream input, ClickHouseCompression compression,
            int compressionLevel, ClickHouseFormat format) {
        final ClickHousePassThruStream stream = ClickHouseChecker.nonNull(input, ClickHouseInputStream.TYPE_NAME)
                .getUnderlyingStream();
        if (stream instanceof ClickHouseFile) {
            return ((ClickHouseFile) stream);
        }

        final boolean hasInput = stream.hasInput();
        final File tmp;
        try {
            tmp = ClickHouseUtils.createTempFile();
        } catch (IOException e) {
            throw new IllegalArgumentException("Failed to create temporary file", e);
        }

        try (ClickHouseOutputStream out = ClickHouseOutputStream.of(new FileOutputStream(tmp))) {
            (hasInput ? stream.getInputStream() : input).pipe(out);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
        return hasInput ? of(tmp, stream.getCompressionAlgorithm(), stream.getCompressionLevel(), stream.getFormat())
                : of(tmp, compression, compressionLevel, format);
    }
Null file which has no compression and format.
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseFile.java