[ 
https://issues.apache.org/jira/browse/HUDI-8577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

sivabalan narayanan updated HUDI-8577:
--------------------------------------
    Fix Version/s: 1.0.2

> Use snapshot query as default in DefaultSource
> ----------------------------------------------
>
>                 Key: HUDI-8577
>                 URL: https://issues.apache.org/jira/browse/HUDI-8577
>             Project: Apache Hudi
>          Issue Type: Sub-task
>            Reporter: Y Ethan Guo
>            Assignee: Jonathan Vexler
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 1.0.1, 1.0.2
>
>
> 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)

Reply via email to