Skip to content

Conversation

@s-robertshaw
Copy link
Contributor

Using the std golang sql package, Scan functionality will quietly fail and the zero value will be used.

During the prepare phase of the sql request the correct types are returned.
xxx_hidden_ColumnClassName ="java.lang.Double"
xxx_hidden_Name ="DOUBLE"
xxx_hidden_Rep =Rep_NUMBER (22)

Special handling already exists for things such as floats and reals. Adding a doubles case solves the issue.

Copy link

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

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

Is there a test you can write to show that this works?

@F21
Copy link
Member

F21 commented Aug 16, 2025

The driver supports Phoenix, HSQLDB and "Generic", with the code to map the columns for each type of database here:

We do have tests against HSQLDB and Phoenix:

However, we don't have tests for the generic mapping as there is no "generic" database to test against. If we test against a specific database, then we should have a mapping for that database, rather than use generic.

I am happy to accept the PR as it currently stands, but the commit message needs to be updated to the format: [CALCITE-XXXX] {JIRA issue title}

@s-robertshaw s-robertshaw changed the title [CALCITE-7136] Add Support for Scanning Double/Float64 [calcite-avatica-go] Add Support for Druid Double Types Aug 18, 2025
@F21 F21 changed the title [calcite-avatica-go] Add Support for Druid Double Types [CALCITE-7136] Add Support for Druid Double Types Aug 25, 2025
@F21 F21 merged commit 9317273 into apache:main Aug 25, 2025
14 checks passed
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