Skip to content

Commit

Permalink
Fix SQLColumns query for new map_extract
Browse files Browse the repository at this point in the history
  • Loading branch information
Mytherin committed Dec 11, 2024
1 parent deb2daa commit 94138d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

#### Build the ODBC client

###### Debug (for development)

```bash
make debug
```
###### Release (for usage)

```bash
make
```

#### Run the ODBC Unit Tests

Expand Down
4 changes: 2 additions & 2 deletions src/common/odbc_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ string OdbcUtils::GetQueryDuckdbColumns(const string &catalog_filter, const stri
'LIST': 12 -- SQL_VARCHAR
} AS mapping,
CASE
WHEN len(mapping[data_type]) != 0 THEN mapping[data_type][1]::BIGINT
WHEN mapping[data_type] IS NOT NULL THEN mapping[data_type]::BIGINT
ELSE data_type_id
END AS "DATA_TYPE",
data_type "TYPE_NAME",
Expand Down Expand Up @@ -152,7 +152,7 @@ string OdbcUtils::GetQueryDuckdbColumns(const string &catalog_filter, const stri
NULL "REMARKS",
column_default "COLUMN_DEF",
CASE
WHEN len(mapping[data_type]) != 0 THEN mapping[data_type][1]::BIGINT
WHEN mapping[data_type] IS NOT NULL THEN mapping[data_type]::BIGINT
ELSE data_type_id
END AS "SQL_DATA_TYPE",
CASE
Expand Down

0 comments on commit 94138d8

Please sign in to comment.