Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GAC-39] update Arrow version that flightsql-odbc (Dremio Seed) works with #11

Draft
wants to merge 2 commits into
base: GAC-odbc-driver
Choose a base branch
from

Conversation

alinaliBQ
Copy link

@alinaliBQ alinaliBQ commented Dec 13, 2023

Rationale for this change

We plan to let flightsql-odbc be build with the Arrow repository that it resides in. As a first step, it needs to work with today's Arrow version.

What changes are included in this PR?

Short summary:

  • Added workflow to build flightsql-odbc.
  • Updated C++ standard for flightsql-odbc from 11 to 17.
  • Updated Arrow APIs called in flightsql-odbc from Arrow 9.0.0 version to Arrow 14.0.0 version.

Detailed changes:

Are these changes tested?

The existing flightsql-odbc tests are passing. No new tests have been added as part of this PR.

Are there any user-facing changes?

N/A.

Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

In the case of PARQUET issues on JIRA the title also supports:

PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@alinaliBQ alinaliBQ force-pushed the alinaliBQ/GAC-39/update-arrow-ver-flightsql-odbc branch 2 times, most recently from 24421a8 to 0aa0902 Compare December 13, 2023 04:14
@alinaliBQ alinaliBQ force-pushed the GAC-odbc-driver branch 2 times, most recently from 8abf8bd to 59a015f Compare December 18, 2023 18:06
@alinaliBQ alinaliBQ force-pushed the alinaliBQ/GAC-39/update-arrow-ver-flightsql-odbc branch from 0aa0902 to 65fd7c9 Compare December 18, 2023 18:08
@alinaliBQ alinaliBQ changed the title apacheGH-30622: [GAC-39] update Arrow version that flightsql-odbc (Dremio Seed) works with [GAC-39] update Arrow version that flightsql-odbc (Dremio Seed) works with Dec 18, 2023
@alinaliBQ alinaliBQ force-pushed the alinaliBQ/GAC-39/update-arrow-ver-flightsql-odbc branch from 4a96998 to 5c03e97 Compare December 19, 2023 01:21
@alinaliBQ alinaliBQ marked this pull request as ready for review December 19, 2023 17:45
@alinaliBQ alinaliBQ marked this pull request as draft December 20, 2023 19:58
Copy link

@affonsov affonsov left a comment

Choose a reason for hiding this comment

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

LGTM just one minor nit

.github/workflows/flightsqlodbc_build.yml Outdated Show resolved Hide resolved
* Use 1.3 Zlib version
- The built-in base line does not work, since it will try to get zlib from https://www.zlib.net/zlib-1.2.12.tar.gz,
which is no longer valid. To fix this, I changed ZLIB version to 1.3.
* Fix ARROW_GIT_REPOSITORY not set error
   * In `flight_sql\CMakeLists.txt`, set(ARROW_GIT_REPOSITORY ... CACHE STRING) only sets the default value of ARROW_GIT_REPOSITORY. This value is supposed to be set in the build script (e.g.,  `cpp/src/flightsql_odbc/flightsql-odbc/build_win64.bat`), and the setting of this value is fixed.
* Create flightsqlodbc_build.yml to add Windows workflow to build flightsql-odbc. Only 64-bit build is supported as Apache Arrow does not support Windows 32-bit build.
* Set C+ standard+ to 17 to accommodate arrow build. `flightsql-odbc` used C++ 11, but arrow 14.0.0 uses C++ 17, so C++ standard is set to 17 to support building of arrow.
* Error arrow/utils/optional.h no longer found is fixed.
* I found that [Arrow commit 5e49174](apache@5e49174)
removes arrow/utils/optional.h and replaces it with <optional> C++ 17 header.
So I updated flightsql-odbc code with when looking at this commit.
* Removed deprecated `std::binary_function`.
* There are build errors from `boost::variant`, so changed `boost::variant` to `std::variant` to align with rest of Arrow repository. Also replaced `boost::get` with `std::get` as a result.
* Fixed "error C2660: 'arrow::flight::FlightInfo::GetSchema': function does not take 2 arguments":
I checked [commit d214455](apache@d214455)
that changed GetSchema, and found that GetSchema(dictionary_memo, out) can be replaced with GetSchema(dictionary_memo).Value(out).
* Fixed error C2661: 'arrow::flight::FlightClient::Connect': no overloaded function takes 3 arguments:
I checked [commit 9e08c50](apache@9e08c50)
that changed Connect, and found that Connect(location, options, client) can be replaced with Connect(location, options).Value(client).
* Fixed error C2660: 'arrow::flight::Location::ForGrpcTls': function does not take 3 arguments:
I checked [commit d214455](apache@d214455)
that changed ForGrpcTls, and found that Connect(host, port, location) can be replaced with ForGrpcTls(host, port).Value(location). Same process to fix error with `Location::ForGrpcTcp`.
* Fixed error of scalar->value being deprecated. I see from [commit 6cc37cf](apache@6cc37cf)
that scalar::value is replaced with scalar::child_value(), so I went with this change.
* Fixed linking errors. `ARROW_FLIGHT_SQL_STATIC` was added in [commit 9c93f82](apache@9c93f82), so now we need to define `ARROW_FLIGHT_SQL_STATIC` in CMakeLists.txt also.
@alinaliBQ alinaliBQ force-pushed the alinaliBQ/GAC-39/update-arrow-ver-flightsql-odbc branch from 5c03e97 to e6ba2c8 Compare January 5, 2024 22:32
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.

2 participants