Skip to content

[HUDI-5340] Hudi supports Spark TVF#7400

Merged
XuQianJin-Stars merged 1 commit intoapache:masterfrom
YannByron:hudi_tvf
Dec 8, 2022
Merged

[HUDI-5340] Hudi supports Spark TVF#7400
XuQianJin-Stars merged 1 commit intoapache:masterfrom
YannByron:hudi_tvf

Conversation

@YannByron
Copy link
Contributor

Change Logs

Support Table-Valued Function.

Impact

none

Risk level (write none, low medium or high below)

none

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@hudi-bot
Copy link
Collaborator

hudi-bot commented Dec 7, 2022

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@YannByron
Copy link
Contributor Author

@XuQianJin-Stars @leesf please take a look. cc @dongkelun @scxwhite

case "read_optimized" =>
assert(instants.isEmpty, "No expressions have to be provided in read_optimized mode.")
options += ("hoodie.datasource.query.type" -> "read_optimized")
case _ =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would also need to add test to cover this case.

val instants = args.tail.map(_.eval().toString)
queryMode match {
case "read_optimized" =>
assert(instants.isEmpty, "No expressions have to be provided in read_optimized mode.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the case instants is not empty should also be covered in test


private def parseOptions(args: Seq[Expression]): Map[String, String] = {
val options = mutable.Map.empty[String, String]
val queryMode = args.head.eval().toString
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some immature ideas, the order of parameters must be fixed in the current way. Can we change the parameter to k=v later? After all, there are many read parameters in the hudi table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants