Skip to content

Conversation

@vahan-activeloop
Copy link
Contributor

@vahan-activeloop vahan-activeloop commented Dec 30, 2025

🚀 🚀 Pull Request

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Things to be aware of

Things to worry about

Additional Context

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the PostgreSQL to DuckDB SQL translator to properly handle TPCH (Transaction Processing Performance Council Benchmark) queries by addressing two critical translation issues: BETWEEN clause handling and column names containing SQL keywords.

  • Enhanced WHERE clause predicate wrapping to use word boundaries when detecting AND/OR operators
  • Added BETWEEN clause tracking to prevent incorrect splitting of BETWEEN...AND syntax
  • Implemented comprehensive test coverage for both BETWEEN clauses and column names with keyword substrings

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
postgres/tests/py_tests/test_pg_duck_translation.py Added two new test cases covering BETWEEN clause translation and column names containing SQL keywords, with multiple test scenarios for each
cpp/deeplake_pg/pg_to_duckdb_translator.cpp Modified WHERE clause parser to track BETWEEN clauses and use word boundary checks when identifying AND/OR operators

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

@khustup2 khustup2 merged commit 40d8166 into main Jan 1, 2026
6 checks passed
@khustup2 khustup2 deleted the vahan/translate-fix branch January 1, 2026 03:13
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.

3 participants