Skip to content

Conversation

@pj-spoelders
Copy link

@pj-spoelders pj-spoelders commented Oct 24, 2025

Checklist

Note: If any of the items in the checklist are not relevant to your PR, leave the box unchecked.

For any Pull Request

Is the following correct:

  • the title of the Pull Request?
  • the title of the corresponding issue?
  • there are no other open Pull Requests for the same update/change?
  • that the issue which this Pull Request fixes ("Fixes...") is mentioned?

When Changes Were Made

Did you:

  • update the changelog?
  • update the implementation?
  • check coverage and add tests: unit tests and, if relevant, integration tests?
  • update the User Guide & other documentation?
  • resolve any failing CI criteria (incl. Sonar quality gate)?

When Preparing a Release

Have you:

  • thought about version number (major, minor, patch)?
  • checked Exasol packages for updates and resolved open vulnerabilities, if easily possible?

@pj-spoelders pj-spoelders changed the title Feature/add dlt support Changes to support DLT Oct 28, 2025
# --- Date/time ---

# Some SQLAlchemy versions dispatch DateTime() to 'DATETIME' (upper-case)
def visit_DATETIME(self, type_, **kw):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it intentional that they aren't built referring to one another? For instance, we could have visit_DATETIME as it currently is defined and then have visit_datetime call self.visit_DATETIME and pass on the values.

Copy link
Author

Choose a reason for hiding this comment

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

Fully agree that this needs to be cleaned up a bit and we reuse methods if they're available/work in our case.

# --- Strings / Text ---

# SA String(length) -> VARCHAR(n); String() -> CLOB (Exasol requires length)
def visit_string(self, type_, **kw):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar question. Why not call visit_VARCHAR or visit_CLOB?

Copy link
Author

Choose a reason for hiding this comment

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

Fully agree that this needs to be cleaned up a bit and we reuse methods if they're available/work in our case.

return "DECIMAL(18,0)"

# Some code paths use DECIMAL directly rather than numeric
def visit_DECIMAL(self, type_, **kw):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just curious as to how these were arrived to: Were the other visit_* functions checked or were these ones that caused difficulties for Exasol with dlt testing?

Copy link
Author

Choose a reason for hiding this comment

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

Yes this is just enough to get DLT working right now, there's probably some/plenty of other cases that might still not work.

try:
return super().do_execute(cursor, statement, parameters, context)
except Exception as e:
mapped = _PYEXA_TO_SA.get(e.__class__.__name__)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We might be able to simplify the exceptions here, as the Python Exception case allows for more than 1 to be checked, and we could extract that to a function if other usages needed to be covered.

However, it's possible you have something more in mind, as it looks like do_execute maybe doesn't cover all execution points.

Copy link
Author

Choose a reason for hiding this comment

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

Let's have a look at how you'd do this this afternoon ..

"""EXASolution has no explicit indexes"""
return []

def type_descriptor(self, typeobj):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you try putting the ExaTimestamp in the colspecs mapping?

https://github.com/exasol/sqlalchemy-exasol/blob/master/sqlalchemy_exasol/websocket.py#L91

Copy link
Author

Choose a reason for hiding this comment

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

Let's try this out.

@raayu83 raayu83 mentioned this pull request Nov 17, 2025
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