Skip to content

Conversation

@WillAyd
Copy link
Contributor

@WillAyd WillAyd commented Jun 12, 2023

No description provided.

@WillAyd WillAyd marked this pull request as ready for review June 12, 2023 23:51

/// \brief Read an AdbcGetInfoData struct with RAII safety
struct GetInfoReader {
explicit GetInfoReader(struct ArrowArrayView* array_view) : array_view_(array_view) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably need to do something here to better tie in the lifetime of the array_view, though I wasn't sure if that was worth doing as a separate class like this or maybe integrating into the existing StreamReader class

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <nanoarrow/nanoarrow.h>
#include <utils.h>
Copy link
Member

Choose a reason for hiding this comment

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

Best to use "" includes for our headers

Hmm, we may also want to switch to common/utils.h or something eventually, a bare utils.h is liable to get mixed up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. The common/utils.h change seems to impact quite a few other modules so may do separately


// returns NULL on error
// for now all arguments are required
struct AdbcGetInfoCatalog* AdbcGetInfoDataGetCatalogByName(
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't these all be GetObjects not GetInfo?

@lidavidm
Copy link
Member

Ah, sorry, I didn't realize that PR just now would conflict with this one

Copy link
Member

@lidavidm lidavidm 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 need to fix up the CMake since I poked the same files

@WillAyd
Copy link
Contributor Author

WillAyd commented Jun 13, 2023

No worries - I can fix conflicts this afternoon. Other PR looks awesome

@lidavidm
Copy link
Member

Looks like one of the include paths isn't right?

@lidavidm
Copy link
Member

Oh, you got it before me

@lidavidm lidavidm merged commit 7a83ef8 into apache:main Jun 13, 2023
@lidavidm lidavidm added this to the ADBC Libraries 0.5.0 milestone Jun 13, 2023
@WillAyd WillAyd deleted the c-schema-helper branch June 13, 2023 19:20
@lidavidm
Copy link
Member

Hmm, was there a reason to put it in utils.c instead of adbc_validation_util.cc?

@WillAyd
Copy link
Contributor Author

WillAyd commented Jun 13, 2023

As things stand now I would be indifferent to the move. In the future I was thinking this could have more utility than just being for tests, ex: a client tool may want to use these abstractions

@lidavidm
Copy link
Member

Ah, yeah, I just saw the error and figured unique_ptr would clean it right up

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.

2 participants