[ 
https://issues.apache.org/jira/browse/HUDI-8577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17903480#comment-17903480
 ] 

Jonathan Vexler commented on HUDI-8577:
---------------------------------------

[https://github.com/apache/hudi/blob/07452fb565ce70b653e447d4acc2a59ac0ea28b1/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DefaultSource.scala#L122]
 we are setting all the defaults here

> 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
>              Labels: pull-request-available
>             Fix For: 1.0.1
>
>
> 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