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

Modify pruning and translation funcs #166

Merged
merged 4 commits into from
Jun 14, 2024
Merged

Modify pruning and translation funcs #166

merged 4 commits into from
Jun 14, 2024

Conversation

wendy-aw
Copy link
Contributor

  • Modify get_md_emb to split the ddl statements from the join string so as to faciliate translations. (Join strings don't have to be translated)
  • Changed tests and affected runners accordingly
  • Remove tildes in sql before translation as sqlglot cannot parse them
  • Exclude comments from formatting of reserved keywords

wendy-aw added 3 commits June 14, 2024 12:22
- fixed splitting in get_md_emb for numeric/decimal cases with parentheses
- remove unparseable tildes in sql before translation
@@ -45,9 +45,10 @@ def generate_prompt(
question_instructions = question + " " + instructions

if table_metadata_string == "":
pruned_metadata_str = prune_metadata_str(
pruned_metadata_ddl, join_str = prune_metadata_str(
Copy link
Member

Choose a reason for hiding this comment

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

Neat, thank you!

Copy link
Member

@rishsriv rishsriv left a comment

Choose a reason for hiding this comment

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

Thank you!

@wendy-aw wendy-aw merged commit 1e1c68e into main Jun 14, 2024
2 checks passed
@wendy-aw wendy-aw deleted the wendy/trans_edits branch June 14, 2024 07:07
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.

2 participants