private ConnectorPageSource createDataPageSource()

in src/main/java/org/apache/paimon/trino/TrinoPageSourceProvider.java [326:365]


    private ConnectorPageSource createDataPageSource(
            String format,
            TrinoInputFile inputFile,
            // TODO construct read option by core-options
            CoreOptions coreOptions,
            List<String> columns,
            List<Type> types,
            List<Domain> domains) {
        switch (format) {
            case "orc":
                {
                    return createOrcDataPageSource(
                            inputFile,
                            // TODO: pass options from catalog configuration
                            new OrcReaderOptions()
                                    // Default tiny stripe size 8 M is too big for paimon.
                                    // Cache stripe will cause more read (I want to read one column,
                                    // but not the whole stripe)
                                    .withTinyStripeThreshold(
                                            DataSize.of(4, DataSize.Unit.KILOBYTE)),
                            columns,
                            types,
                            domains);
                }
            case "parquet":
                {
                    // todo
                    throw new RuntimeException("Unsupport file format: " + format);
                }
            case "avro":
                {
                    // todo
                    throw new RuntimeException("Unsupport file format: " + format);
                }
            default:
                {
                    throw new RuntimeException("Unsupport file format: " + format);
                }
        }
    }