Skip to content

GH-48068: [C++][FlightRPC] Linux ODBC: Configure Dremio instance to allow remote testing#49695

Open
alinaliBQ wants to merge 3 commits intoapache:mainfrom
Bit-Quill:gh-48068-dremio-docker-test
Open

GH-48068: [C++][FlightRPC] Linux ODBC: Configure Dremio instance to allow remote testing#49695
alinaliBQ wants to merge 3 commits intoapache:mainfrom
Bit-Quill:gh-48068-dremio-docker-test

Conversation

@alinaliBQ
Copy link
Copy Markdown
Collaborator

@alinaliBQ alinaliBQ commented Apr 8, 2026

Rationale for this change

GH-48068

The goal is to run remote tests against the Dremio instance on Ubuntu-latest runner, as Dremio docker instances are only available on Linux and they are not supported on macOS/Windows GitHub Actions.

What changes are included in this PR?

  • Added docker-compose.yml.
  • Added logic for setting up dremio account and creating a table.
  • Add ODBC remote test connection variable.
  • set up Dremio remote instance in CI

Note: Enabling Linux tests in CI will be in a separate PR. This PR prepares the Dremio instance for remote testing, which will be used when ODBC Linux tests are supported in CI.

Are these changes tested?

Tested in CI at local repository.

Are there any user-facing changes?

N/A

alinaliBQ and others added 2 commits April 8, 2026 14:31
Authored by Justin

Co-authored-by: justing-bq <justin.gossett@improving.com>
* Disable non-odbc workflows

* Install `netcat` and set `ARROW_FLIGHT_SQL_ODBC_CONN`

* Attempt to enable docker network

Update compose.yaml

Add executable bash script

* add commands for testing Dremio instance value

* Change to use `host.docker.internal`

* Change test to run remote test

Update cpp_extra.yml

* Use `localhost` as hostname

* Use `dremio_container` as host

* Clean up PR

* Test remote instance

* CI can connect to remote instance, revert "Test remote instance"

This reverts commit db975bf.

* Disable ODBC Debian build

* Seeing segfault at ODBC test. Can probably be solved by passing test linkage = static like we did with Ubuntu. Since we don't have capacity to work on Debian now, we can close this.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

⚠️ GitHub issue #48068 has been automatically assigned in GitHub to PR creator.

@alinaliBQ alinaliBQ marked this pull request as ready for review April 9, 2026 16:24
@alinaliBQ
Copy link
Copy Markdown
Collaborator Author

@lidavidm @kou This PR is ready for review, please have a look

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a reason we can't keep this in the same compose file as everything else?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have moved this inside the same compose file at project root. There is no preference from my end

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Apr 9, 2026
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you compose.yaml because it's the preferred file name?
See also: #47806

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yup, I have moved this inside the compose.yaml at project root.

# specific language governing permissions and limitations
# under the License.

#!/bin/bash
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you move the shebang to the first line?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yup, done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you enable pre-commit hooks for this file?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, done

-d "{ \"userName\": \"$ADMIN_USER\", \"password\": \"$ADMIN_PASSWORD\" }" \
| grep -oP '(?<="token":")[^"]+')

SQL_QUERY="Create Table \$scratch.ODBCTest As SELECT CAST(2147483647 AS INTEGER) AS sinteger_max, CAST(9223372036854775807 AS BIGINT) AS sbigint_max, CAST(999999999 AS DECIMAL(38,0)) AS decimal_positive, CAST(3.40282347E38 AS FLOAT) AS float_max, CAST(1.7976931348623157E308 AS DOUBLE) AS double_max, CAST(true AS BOOLEAN) AS bit_true, CAST(DATE '9999-12-31' AS DATE) AS date_max, CAST(TIME '23:59:59' AS TIME) AS time_max, CAST(TIMESTAMP '9999-12-31 23:59:59' AS TIMESTAMP) AS timestamp_max;"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about format this for easy to read?

Suggested change
SQL_QUERY="Create Table \$scratch.ODBCTest As SELECT CAST(2147483647 AS INTEGER) AS sinteger_max, CAST(9223372036854775807 AS BIGINT) AS sbigint_max, CAST(999999999 AS DECIMAL(38,0)) AS decimal_positive, CAST(3.40282347E38 AS FLOAT) AS float_max, CAST(1.7976931348623157E308 AS DOUBLE) AS double_max, CAST(true AS BOOLEAN) AS bit_true, CAST(DATE '9999-12-31' AS DATE) AS date_max, CAST(TIME '23:59:59' AS TIME) AS time_max, CAST(TIMESTAMP '9999-12-31 23:59:59' AS TIMESTAMP) AS timestamp_max;"
SQL_QUERY="
Create Table \$scratch.ODBCTest As
SELECT CAST(2147483647 AS INTEGER) AS sinteger_max,
CAST(9223372036854775807 AS BIGINT) AS sbigint_max,
CAST(999999999 AS DECIMAL(38,0)) AS decimal_positive,
CAST(3.40282347E38 AS FLOAT) AS float_max,
CAST(1.7976931348623157E308 AS DOUBLE) AS double_max,
CAST(true AS BOOLEAN) AS bit_true,
CAST(DATE '9999-12-31' AS DATE) AS date_max,
CAST(TIME '23:59:59' AS TIME) AS time_max,
CAST(TIMESTAMP '9999-12-31 23:59:59' AS TIMESTAMP) AS timestamp_max;
"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done! Thanks

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Apr 10, 2026
@alinaliBQ alinaliBQ force-pushed the gh-48068-dremio-docker-test branch 2 times, most recently from 3f9bd41 to 7b6d340 Compare April 10, 2026 21:17
- Move `dremio` to `compose.yaml` at project root
- Move shebang to first line
- add `set_up_dremio_instance.sh` to pre-commit hook
- Fix `SQL_QUERY` variable format
@alinaliBQ alinaliBQ force-pushed the gh-48068-dremio-docker-test branch from 7b6d340 to 4a892cf Compare April 10, 2026 21:20
Copy link
Copy Markdown
Collaborator Author

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

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

Addressed code review comments

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have moved this inside the same compose file at project root. There is no preference from my end

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yup, I have moved this inside the compose.yaml at project root.

# specific language governing permissions and limitations
# under the License.

#!/bin/bash
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yup, done

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, done

-d "{ \"userName\": \"$ADMIN_USER\", \"password\": \"$ADMIN_PASSWORD\" }" \
| grep -oP '(?<="token":")[^"]+')

SQL_QUERY="Create Table \$scratch.ODBCTest As SELECT CAST(2147483647 AS INTEGER) AS sinteger_max, CAST(9223372036854775807 AS BIGINT) AS sbigint_max, CAST(999999999 AS DECIMAL(38,0)) AS decimal_positive, CAST(3.40282347E38 AS FLOAT) AS float_max, CAST(1.7976931348623157E308 AS DOUBLE) AS double_max, CAST(true AS BOOLEAN) AS bit_true, CAST(DATE '9999-12-31' AS DATE) AS date_max, CAST(TIME '23:59:59' AS TIME) AS time_max, CAST(TIMESTAMP '9999-12-31 23:59:59' AS TIMESTAMP) AS timestamp_max;"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants