Skip to content

Dev#233

Merged
hyuuuun merged 3 commits into
mainfrom
dev
Mar 14, 2026
Merged

Dev#233
hyuuuun merged 3 commits into
mainfrom
dev

Conversation

@hyeonRS
Copy link
Copy Markdown
Contributor

@hyeonRS hyeonRS commented Mar 14, 2026

개요

[GET families/member 조회 쿼리 수정 (성능 이슈)]

관련 BackLog

Resolves: (Backlog Number, ...)

PR 유형

  • [] 새로운 기능 추가
  • 버그 수정
  • CSS 등 사용자 UI 디자인 변경
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

PR Checklist

  • 커밋 메시지 컨벤션에 맞게 작성했습니다.
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

Summary by CodeRabbit

  • Refactor
    • Improved database query structure for family member data retrieval by reorganizing aggregation logic, enhancing query maintainability and performance without affecting user-facing functionality.

@hyeonRS hyeonRS requested a review from hyuuuun March 14, 2026 18:12
@hyeonRS hyeonRS self-assigned this Mar 14, 2026
@hyeonRS hyeonRS added the bug 버그 관련 label Mar 14, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 14, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7d77f066-f8c3-4abc-9cd2-48292e88cc67

📥 Commits

Reviewing files that changed from the base of the PR and between a98aac7 and beb7f52.

📒 Files selected for processing (1)
  • src/main/resources/mapper/family/FamilyMapper.xml

📝 Walkthrough

Walkthrough

The selectFamilyMembers query in FamilyMapper.xml was refactored to extract monthly shared usage aggregation from an inline derived subquery into a separate LEFT JOIN, simplifying the overall query structure while preserving existing logic.

Changes

Cohort / File(s) Summary
SQL Query Refactoring
src/main/resources/mapper/family/FamilyMapper.xml
Restructured selectFamilyMembers query by extracting the monthly shared usage aggregation into a dedicated subquery (fsu) and joining it via LEFT JOIN. The calculation of sharedPoolRemainingAmount now references the new aggregation table. Query logic and result set remain functionally equivalent, with improved structural clarity.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • Misu0616

Poem

🐰 A query once tangled, now clean as can be,
With aggregations extracted for all to see,
The logic stays true, just prettier to read,
A hop and a skip—refactored indeed! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hyuuuun hyuuuun merged commit b9eb164 into main Mar 14, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 버그 관련

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants