Skip to content

refactor: _get_column_info 함수 최적화 #119

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ehddnr301
Copy link
Collaborator

#️⃣ Issue Number

📝 요약(Summary)

  • get_column_info 함수의 성능 최적화를 통해 테이블당 30-40초 걸리던 처리 시간을 대폭 단축

💬 To Reviewers (선택)

  • 기존 table_info 경로의 vector db 제거 후 재생성이 빠르게 되는지 테스트 부탁드립니다!

PR Checklist

  • TBD

reference) How to Code Review

  • 따봉(👍): 리뷰어가 리뷰이의 코드에서 칭찬의 의견을 남기고 싶을 때 사용합니다.
  • 느낌표(❗): 리뷰어가 리뷰이에게 필수적으로 코드 수정을 요청할 때 사용합니다.
  • 물음표 (❓): 리뷰어가 리뷰이에게 의견을 물어보고 싶을 때 사용합니다.
  • 알약 (💊): 리뷰어가 리뷰이의 코드에서 개선된 방법을 제안하지만 그것의 반영이 필수까지는 아닐 때 사용합니다.

@ehddnr301 ehddnr301 linked an issue Jun 11, 2025 that may be closed by this pull request
@ehddnr301 ehddnr301 force-pushed the Feature/118-get_column_info-최적화-작업 branch from 529430d to 15ee69d Compare June 11, 2025 14:35
@ParkGyeongTae
Copy link
Contributor

@ehddnr301 님, 오랜만입니다~! 잘 지내시죠~

master 브랜치에서는 "테이블 정보 수집" 이후 "컬럼 정보 수집" 을 진행하는데, 이 브랜치에서는 "테이블 정보 수집" 이후 "컬럼 정보 수집" 을 진행하지 않는 것으로 확인됩니다.

제 테스트 명령어는 아래와 같습니다.

# 환경 설치
conda create -n lang2sql2 python=3.12 -y \
&& conda activate lang2sql2 \
&& pip install .

# 실행
lang2sql --datahub_server http://34.125.57.80:8080 run-streamlit

# 웹에서 아무 쿼리 실행

현재 브랜치
image

master 브랜치
image

@ehddnr301
Copy link
Collaborator Author

안녕하세요 @ParkGyeongTae 님!! 리뷰 감사합니다. 무탈하시죠?ㅎㅎ

아마도 아래 부분이 기존보다 시간이 좀 걸려서 컬럼 정보 수집중 이 뜨는게 조금 느렸던것 같습니다.

    fetcher = _get_fetcher()
    urns = list(fetcher.get_urns())
    urn_table_mapping = {}
    for urn in urns:
        table_name = fetcher.get_table_name(urn)
        if table_name:
            urn_table_mapping[table_name] = urn

해당부분이 넘어가고 나면 저는 아래와 같이 출력되는데, 기다려도 아래와 같이 출력이 안되시는걸까요!? 제가 오늘 저녁에 추가로 살펴보겠습니다.

image

@ParkGyeongTae
Copy link
Contributor

@ehddnr301 앗~ 5분정도 기다리니까 실행합니다..!
훨씬 빨라졌네요!
image

Copy link
Contributor

@ParkGyeongTae ParkGyeongTae left a comment

Choose a reason for hiding this comment

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

👍

@ehddnr301
Copy link
Collaborator Author

@ehddnr301 앗~ 5분정도 기다리니까 실행합니다..!
훨씬 빨라졌네요!
image

그래도 꽤 걸리는군요...! Datahub 를 로컬에서 실행하실수있도록 최대한 빨리 준비해보겠습니다!

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.

get_column_info 최적화 작업
2 participants