Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve different smells in the code. #356

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

JASH-PATEL-6566
Copy link

  • Decompose the conditions - source.JdbcSourceTask.java

  • Rename variable - source.JdbcSourceTask.java (atLeastOneTimestampNotOptional to timestampRequired)

  • Extract methods - source.JdbcSourceTask.java (start() method is so long so I extract the methods from this and try to make start() method small. Extracted methods: validateConfig(), initializeDialect(), processQueryMode(), getTablePartitionsToCheck(), processOffsets(), addTableQuerier())

  • Move method - sink.Dbstructure.java (DbStructure class in not a proper place for tableDefinitionFor() so I moved it into TableDefinitions class)

  • Extract Class - sink.JdbcDbWriter (Decompose the JdbcDbWriter into 2 classes: BufferManager and TableNameGenerator)

  • Pull-up method - sink.JdbcSinkConfig.java (pull-up method means move method from sub class to parent class, so I moved validateDeleteEnabled() and validatePKModeAgainstPKFields() into parent class which is JdbcConfig)

@JASH-PATEL-6566 JASH-PATEL-6566 requested review from a team as code owners November 30, 2024 01:48
@JASH-PATEL-6566 JASH-PATEL-6566 changed the title Solving different smells in the code. Solve different smells in the code. Dec 5, 2024
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.

1 participant