Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Optimization code
  • Loading branch information
wenfang committed Oct 22, 2019
commit 3d5c1099accba437e006d34e2d9d0247b8b30ffc
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ private[xsql] class MysqlManager(conf: SparkConf) extends DataSourceManager with
dsName: String,
dbName: String,
tbName: String): Unit = {
val tablePartitionsMap = partitionsMap.get(dbName)
if (tablePartitionsMap != None) {
tablePartitionsMap.get.get(tbName).foreach { m =>
partitionsMap.get(dbName).foreach { tablePartitionsMap =>
tablePartitionsMap.get(tbName).foreach {m =>
specialProperties += ((s"${dsName}.${dbName}.${tbName}", m))
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

  Option(partitionsMap(dbName)).map{ tablePartitionsMap =>
    Option(tablePartitionsMap(tbName)).foreach { m =>
      specialProperties += ((s"${dsName}.${dbName}.${tbName}", m))
    }
  }

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your advice, but the code can't pass.

Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM

Expand Down