davidhcoe opened a new issue, #2278:
URL: https://github.com/apache/arrow-adbc/issues/2278

   ### What happened?
   
   I have a table (PRODUCT2) that has a relationship with ORDER2:
   
   ```
   create or replace TABLE DEMODB.PUBLIC.ORDERS2 (
        ORDER_ID VARCHAR(16777216) NOT NULL,
        QUANTITY_SOLD NUMBER(11,2),
        primary key (ORDER_ID)
   );
   
   create or replace TABLE DEMODB.PUBLIC.PRODUCT2 (
        PRODUCT_ID VARCHAR(16777216) NOT NULL,
        PRODUCT_NAME VARCHAR(16777216),
        ORDER_ID VARCHAR(16777216),
        primary key (PRODUCT_ID),
        foreign key (ORDER_ID) references DEMODB.PUBLIC.ORDERS2(ORDER_ID)
   );
   ```
   When I run the SQL queries for `GetObjects("DEMODB","PUBLIC","PRODUCT2", 
nil, nil)`, I get results from Snowflake that the constraint_column_names are 
present:
   
   ```
   GET_OBJECTS
   "{
     ""catalog_db_schemas"": [
       {
         ""db_schema_name"": ""PUBLIC"",
         ""db_schema_tables"": [
           {
             ""table_columns"": [
               {
                 ""column_name"": ""PRODUCT_ID"",
                 ""ordinal_position"": 1,
                 ""xdbc_char_octet_length"": 16777216,
                 ""xdbc_column_size"": 16777216,
                 ""xdbc_is_nullable"": ""NO"",
                 ""xdbc_nullable"": 0,
                 ""xdbc_type_name"": ""TEXT""
               },
               {
                 ""column_name"": ""PRODUCT_NAME"",
                 ""ordinal_position"": 2,
                 ""xdbc_char_octet_length"": 16777216,
                 ""xdbc_column_size"": 16777216,
                 ""xdbc_is_nullable"": ""YES"",
                 ""xdbc_nullable"": 1,
                 ""xdbc_type_name"": ""TEXT""
               },
               {
                 ""column_name"": ""ORDER_ID"",
                 ""ordinal_position"": 3,
                 ""xdbc_char_octet_length"": 16777216,
                 ""xdbc_column_size"": 16777216,
                 ""xdbc_is_nullable"": ""YES"",
                 ""xdbc_nullable"": 1,
                 ""xdbc_type_name"": ""TEXT""
               }
             ],
             ""table_constraints"": [
               {
                 ""constraint_column_names"": [
                   ""PRODUCT_ID""
                 ],
                 ""constraint_column_usage"": [],
                 ""constraint_name"": 
""SYS_CONSTRAINT_386a9022-ad6e-47ed-94b6-f48501938f5f"",
                 ""constraint_type"": ""PRIMARY KEY""
               },
               {
                 ""constraint_column_names"": [
                   ""ORDER_ID""
                 ],
                 ""constraint_column_usage"": [
                   {
                     ""fk_catalog"": ""DEMODB"",
                     ""fk_column_name"": ""ORDER_ID"",
                     ""fk_db_schema"": ""PUBLIC"",
                     ""fk_table"": ""ORDERS2""
                   }
                 ],
                 ""constraint_name"": 
""SYS_CONSTRAINT_cfb3b763-4a97-4c0b-8356-a493c03b7e66"",
                 ""constraint_type"": ""FOREIGN KEY""
               }
             ],
             ""table_name"": ""PRODUCT2"",
             ""table_type"": ""BASE TABLE""
           }
         ]
       }
     ],
     ""catalog_name"": ""DEMODB""
   }"
   
   ```
   
   However, when I inspect the results in the debugger:
   
   
![image](https://github.com/user-attachments/assets/e7b7bedb-85ad-4184-b4b3-842de970e523)
   
   it appears there are no ConstraintColumnNames or ConstraintColumnUsage 
returned:
   
   
![image](https://github.com/user-attachments/assets/6c3887e0-4da6-453c-86c7-1e8d5da06d6b)
   
   I see there is some code in driver_base to parse these, but it appears only 
the FlightSQL driver calls that now. I don't see where the Snowflake driver 
would be parsing these values.
   
   ### Stack Trace
   
   _No response_
   
   ### How can we reproduce the bug?
   
   _No response_
   
   ### Environment/Setup
   
   _No response_


-- 
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