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

Y Ethan Guo updated HUDI-8577:
------------------------------
    Description: 
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}
 

> 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
>            Priority: Major
>
> 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