lidavidm commented on code in PR #757:
URL: https://github.com/apache/arrow-adbc/pull/757#discussion_r1226627001


##########
c/driver/postgresql/postgresql_test.cc:
##########
@@ -402,6 +402,193 @@ TEST_F(PostgresConnectionTest, 
GetObjectsGetAllFindsPrimaryKey) {
   ASSERT_TRUE(seen_primary_key) << "could not find primary key for 
adbc_pkey_test";
 }
 
+TEST_F(PostgresConnectionTest, GetObjectsGetAllFindsForeignKey) {

Review Comment:
   Could possibly factor out a helper that just drops the given table + runs 
the given DDL so you can `ASSERT_NO_FATAL_FAILURE(CreateTable("adbc_fkey_test", 
"CREATE TABLE ..."));`



##########
c/driver/postgresql/postgresql_test.cc:
##########
@@ -402,6 +402,193 @@ TEST_F(PostgresConnectionTest, 
GetObjectsGetAllFindsPrimaryKey) {
   ASSERT_TRUE(seen_primary_key) << "could not find primary key for 
adbc_pkey_test";
 }
 
+TEST_F(PostgresConnectionTest, GetObjectsGetAllFindsForeignKey) {

Review Comment:
   The nested loop is...messy, I have had some ideas about how to simplify this 
sort of thing (basically, I think Arrow could use an IDL like Protobuf, where 
you can take a predefined schema and generate higher-level 
accessors/iterators/validators)



##########
c/driver/postgresql/postgresql_test.cc:
##########
@@ -402,6 +402,193 @@ TEST_F(PostgresConnectionTest, 
GetObjectsGetAllFindsPrimaryKey) {
   ASSERT_TRUE(seen_primary_key) << "could not find primary key for 
adbc_pkey_test";
 }
 
+TEST_F(PostgresConnectionTest, GetObjectsGetAllFindsForeignKey) {

Review Comment:
   I've also thought about whether some complicated tests could belong in 
Python instead (with the caveats around that development loop)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to