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

[Refactor] Refactor BaseTableInfo to be more clear #39546

Merged

Conversation

LiShuMing
Copy link
Contributor

@LiShuMing LiShuMing commented Jan 19, 2024

Why I'm doing:

BaseTableInfo is meta data and should not contain much util functions.

What I'm doing:

  • Remove some redundant methods from BaseTableInfo and add more checks.

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.2
    • 3.1
    • 3.0
    • 2.5

@LiShuMing LiShuMing requested review from a team as code owners January 19, 2024 05:10
@LiShuMing LiShuMing force-pushed the fix/main/refactor_base_table_infos.v1 branch from 83a0e71 to 88fa5df Compare January 26, 2024 09:22
@LiShuMing LiShuMing changed the title [Refactor] Refactor BaseTableInfo into BaseTableInfo and BTInfoHelper [Refactor] Refactor BaseTableInfo to be more clear Jan 29, 2024
@LiShuMing LiShuMing force-pushed the fix/main/refactor_base_table_infos.v1 branch from d32ddd8 to ba4be98 Compare January 29, 2024 01:58
murphyatwork
murphyatwork previously approved these changes Jan 30, 2024
@nshangyiming nshangyiming self-assigned this Jan 30, 2024
* because this method may return null if base table has already dropped or schema changed.
* </p>
* @return {@link Table} if BaseTableInfo is health otherwise null will be returned.
*/
@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

when to make this api private?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

later... because this will change too much codes.

nshangyiming
nshangyiming previously approved these changes Jan 30, 2024
@nshangyiming nshangyiming removed their assignment Jan 30, 2024
Signed-off-by: shuming.li <ming.moriarty@gmail.com>
@LiShuMing LiShuMing dismissed stale reviews from nshangyiming and murphyatwork via 0ab9b9e February 1, 2024 09:16
@LiShuMing LiShuMing force-pushed the fix/main/refactor_base_table_infos.v1 branch from ba4be98 to 0ab9b9e Compare February 1, 2024 09:16
Copy link

sonarqubecloud bot commented Feb 1, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

6 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

github-actions bot commented Feb 1, 2024

[FE Incremental Coverage Report]

pass : 60 / 63 (95.24%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/catalog/BaseTableInfo.java 41 44 93.18% [140, 143, 211]
🔵 com/starrocks/catalog/ForeignKeyConstraint.java 11 11 100.00% []
🔵 com/starrocks/sql/analyzer/MaterializedViewAnalyzer.java 8 8 100.00% []

Copy link

github-actions bot commented Feb 1, 2024

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@LiShuMing LiShuMing enabled auto-merge (squash) February 2, 2024 05:28
@LiShuMing LiShuMing merged commit d2dd364 into StarRocks:main Feb 2, 2024
58 checks passed
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