You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Vinoth Chandar (Jira)" <ji...@apache.org> on 2024/12/05 03:16:00 UTC
[jira] [Assigned] (HUDI-8577) Use snapshot query as default in DefaultSource
[ https://issues.apache.org/jira/browse/HUDI-8577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vinoth Chandar reassigned HUDI-8577:
------------------------------------
Assignee: Jonathan Vexler
> Use snapshot query as default in DefaultSource
> ----------------------------------------------
>
> Key: HUDI-8577
> URL: https://issues.apache.org/jira/browse/HUDI-8577
> Project: Apache Hudi
> Issue Type: Improvement
> Reporter: Y Ethan Guo
> Assignee: Jonathan Vexler
> Priority: Blocker
> Fix For: 1.1.0
>
>
> This does not take the default query type from the config definition.
>
> {code:java}
> def createRelation(sqlContext: SQLContext,
> metaClient: HoodieTableMetaClient,
> schema: StructType,
> globPaths: Seq[StoragePath],
> parameters: Map[String, String]): BaseRelation = {
> val tableType = metaClient.getTableType
> val isBootstrappedTable = metaClient.getTableConfig.getBootstrapBasePath.isPresent
> val queryType = parameters(QUERY_TYPE.key) {code}
> {code:java}
> val QUERY_TYPE: ConfigProperty[String] = ConfigProperty
> .key("hoodie.datasource.query.type")
> .defaultValue(QUERY_TYPE_SNAPSHOT_OPT_VAL)
> .withAlternatives("hoodie.datasource.view.type")
> .withValidValues(QUERY_TYPE_SNAPSHOT_OPT_VAL, QUERY_TYPE_READ_OPTIMIZED_OPT_VAL, QUERY_TYPE_INCREMENTAL_OPT_VAL)
> .withDocumentation("Whether data needs to be read, in `" + QUERY_TYPE_INCREMENTAL_OPT_VAL + "` mode (new data since an instantTime) " +
> "(or) `" + QUERY_TYPE_READ_OPTIMIZED_OPT_VAL + "` mode (obtain latest view, based on base files) (or) `" + QUERY_TYPE_SNAPSHOT_OPT_VAL + "` mode " +
> "(obtain latest view, by merging base and (if any) log files)") {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)