Skip to content

Conversation

@xuzifu666
Copy link
Member

@xuzifu666 xuzifu666 commented Sep 1, 2023

Change Logs

Fix ut due to the scala compile ambiguity of Properties#putAl

Impact

none

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

If medium or high, explain what verification was done to mitigate the risks.

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

@xuzifu666
Copy link
Member Author

xuzifu666 commented Sep 1, 2023

@danny0405 have a review plz

Copy link
Member

@codope codope left a comment

Choose a reason for hiding this comment

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

What's the ambiguity here? Does it behave differently for scala 2.11, 2.12 and 2.13?
HoodieWriteConfig.newBuilder.withProps() accepts a Map. Before putAll, if we just do JavaConverters.mapAsJavaMapConverter(hudiOpts).asJava, it should be sufficient right? Why do we have to wrap in TypedProperties.fromMap?

@xuzifu666
Copy link
Member Author

What's the ambiguity here? Does it behave differently for scala 2.11, 2.12 and 2.13? HoodieWriteConfig.newBuilder.withProps() accepts a Map. Before putAll, if we just do JavaConverters.mapAsJavaMapConverter(hudiOpts).asJava, it should be sufficient right? Why do we have to wrap in TypedProperties.fromMap?

@codope it is a bug in scala2.12 scala/bug#10418 ,when we run some ut would report error like: ambiguous reference to overloaded definition,
both method putAll in class Properties of type (x$1: java.util.Map[_, ])Unit
and method putAll in class Hashtable of type (x$1: java.util.Map[
<: Object, _ <: Object])Unit
match argument types (java.util.Map[String,String])
props.putAll(hudiOpts.asJava). we also fix it in moulde #8511

@xuzifu666 xuzifu666 requested a review from codope September 1, 2023 13:48
@hudi-bot
Copy link
Collaborator

hudi-bot commented Sep 1, 2023

CI report:

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

@xuzifu666 xuzifu666 closed this Sep 2, 2023
@xuzifu666 xuzifu666 reopened this Sep 2, 2023
@codope codope merged commit 44cd05c into apache:master Sep 2, 2023
leosanqing pushed a commit to leosanqing/hudi that referenced this pull request Sep 13, 2023
TheR1sing3un pushed a commit to TheR1sing3un/hudi that referenced this pull request Feb 12, 2025
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.

3 participants