Skip to content

Avoid JIT imports in BodoSQL C++ backend#907

Merged
ehsantn merged 63 commits intomainfrom
ehsan/bodosql_cpp_backend_no_jit
Nov 10, 2025
Merged

Avoid JIT imports in BodoSQL C++ backend#907
ehsantn merged 63 commits intomainfrom
ehsan/bodosql_cpp_backend_no_jit

Conversation

@ehsantn
Copy link
Collaborator

@ehsantn ehsantn commented Oct 31, 2025

Changes included in this PR

Splits JIT and non-JIT code in BodoSQL to allow lazy JIT import (if necessary) in the new C++ backend.

Testing strategy

Opened an issue to check for avoiding JIT imports in tests since needs some work.

User facing changes

None.

Checklist

  • Pipelines passed before requesting review. To run CI you must include [run CI] in your commit message.
  • I am familiar with the Contributing Guide
  • I have installed + ran pre-commit hooks.

@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 39.50617% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.80%. Comparing base (c33fbb5) to head (a450747).
⚠️ Report is 111 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #907      +/-   ##
==========================================
+ Coverage   66.68%   68.80%   +2.11%     
==========================================
  Files         186      195       +9     
  Lines       66795    67547     +752     
  Branches     9507     9593      +86     
==========================================
+ Hits        44543    46473    +1930     
+ Misses      19572    18245    -1327     
- Partials     2680     2829     +149     

from urllib.parse import parse_qsl, urlparse


def parse_dbtype(con_str) -> tuple[str, str]:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The code in this file is just moved here and not changed.

Copy link
Collaborator

@DrTodd13 DrTodd13 left a comment

Choose a reason for hiding this comment

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

Might be helpful on this type of PR to note when code that is moved is also changed. Also, might help to describe categories of changes and reasoning so you can judge at that level once rather than try to figure out the reason for 50 identical changes. Anyway, everything looks reasonable to me.

Unsupported = 29


# Scalar dtypes for supported Bodo Arrays
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved compiler related code to context_ext.py and added a no-JIT path for getting SQL data types from dataframes and TablePaths.

def _ensure_dynamic_params_list(dynamic_params_list: Any) -> list:
"""Verify the supplied Dynamic params list is a supported type
and converts the result to a list.
def add_table_type(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just moved here with minor changes to avoid importing JIT for typing unnecessarily.

JavaEntryPoint.addTableToSchema(schema, table)


def _generate_table_read(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just moved here with minor changes to avoid importing JIT for typing unnecessarily.

return read_line


def create_java_dynamic_parameter_type_list(dynamic_params_list: list[Any]):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved here with changes to avoid importing JIT for typing unnecessarily.

return build_java_array_list(types_list)


def create_java_named_parameter_type_map(named_params: dict[str, Any]):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved here with changes to avoid importing JIT for typing unnecessarily.

)


# Scalar dtypes for supported Bodo Arrays
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All this code is just moved here.

@ehsantn
Copy link
Collaborator Author

ehsantn commented Nov 9, 2025

Might be helpful on this type of PR to note when code that is moved is also changed. Also, might help to describe categories of changes and reasoning so you can judge at that level once rather than try to figure out the reason for 50 identical changes. Anyway, everything looks reasonable to me.

Thanks. Makes sense. Added some comments for the next reviewer.

Copy link
Contributor

@scott-routledge2 scott-routledge2 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @ehsantn !

@ehsantn ehsantn merged commit 7cd7ff5 into main Nov 10, 2025
28 of 29 checks passed
@ehsantn ehsantn deleted the ehsan/bodosql_cpp_backend_no_jit branch November 10, 2025 15:06
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