All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.delta.flink.internal.table.QueryOptions Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
package io.delta.flink.internal.table;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import io.delta.flink.internal.table.DeltaFlinkJobSpecificOptions.QueryMode;

/**
 * Data object containing information about Delta table path, query mode (streaming or batch) and
 * used job-specific options such as startingVersion, versionAsOf etc.
 */
public class QueryOptions {

    /**
     * Path to Delta table.
     */
    private final String deltaTablePath;

    /**
     * Selected query mode for query.
     */
    private final QueryMode queryMode;

    /**
     * Job-specific options for given query defined as query hint.
     * Map's key represents an option name, map's value represent an option value.
     */
    private final Map jobSpecificOptions = new HashMap<>();

    public QueryOptions(
        String deltaTablePath,
        QueryMode queryMode,
        Map jobSpecificOptions) {
        this.deltaTablePath = deltaTablePath;
        this.queryMode = queryMode;
        this.jobSpecificOptions.putAll(jobSpecificOptions);
    }

    public String getDeltaTablePath() {
        return deltaTablePath;
    }

    public QueryMode getQueryMode() {
        return queryMode;
    }

    /**
     * @return an unmodifiable {@code java.util.Map} containing job-specific options.
     */
    public Map getJobSpecificOptions() {
        return Collections.unmodifiableMap(jobSpecificOptions);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy