Skip to content

Commit

Permalink
Corrected DuckDB SQL Info
Browse files Browse the repository at this point in the history
  • Loading branch information
prmoore77 committed Jul 16, 2024
1 parent 7c3b7e2 commit 6b3097f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/duckdb/duckdb_sql_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

#include "duckdb_sql_info.h"

#include <duckdb.hpp>
#include <arrow/flight/sql/types.h>
#include "arrow/util/config.h"

namespace arrow {
namespace flight {
Expand All @@ -32,14 +34,20 @@ SqlInfoResultMap GetSqlInfoResultMap() {
{SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_NAME,
SqlInfoResult(std::string("db_name"))},
{SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_VERSION,
SqlInfoResult(std::string("duckdb"))},
SqlInfoResult(std::string("duckdb " + std::string(duckdb_library_version())))},
{SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_ARROW_VERSION,
SqlInfoResult(std::string("8.0.0-SNAPSHOT" /* Only an sqlite */))},
SqlInfoResult(std::string(ARROW_VERSION_STRING))},
{SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_READ_ONLY, SqlInfoResult(false)},
{SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_SQL, SqlInfoResult(true)},
{SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_SUBSTRAIT, SqlInfoResult(false)},
{SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_TRANSACTION,
SqlInfoResult(SqlInfoOptions::SqlSupportedTransaction::
SQL_SUPPORTED_TRANSACTION_TRANSACTION)},
{SqlInfoOptions::SqlInfo::FLIGHT_SQL_SERVER_CANCEL, SqlInfoResult(false)},
{SqlInfoOptions::SqlInfo::SQL_DDL_CATALOG,
SqlInfoResult(false)},
SqlInfoResult(true)},
{SqlInfoOptions::SqlInfo::SQL_DDL_SCHEMA,
SqlInfoResult(false)},
SqlInfoResult(true)},
{SqlInfoOptions::SqlInfo::SQL_DDL_TABLE, SqlInfoResult(true)},
{SqlInfoOptions::SqlInfo::SQL_IDENTIFIER_CASE,
SqlInfoResult(int64_t(SqlInfoOptions::SqlSupportedCaseSensitivity::
Expand All @@ -52,7 +60,7 @@ SqlInfoResultMap GetSqlInfoResultMap() {
{SqlInfoOptions::SqlInfo::SQL_ALL_TABLES_ARE_SELECTABLE, SqlInfoResult(true)},
{SqlInfoOptions::SqlInfo::SQL_NULL_ORDERING,
SqlInfoResult(
int64_t(SqlInfoOptions::SqlNullOrdering::SQL_NULLS_SORTED_AT_START))},
int64_t(SqlInfoOptions::SqlNullOrdering::SQL_NULLS_SORTED_AT_END))},
{SqlInfoOptions::SqlInfo::SQL_KEYWORDS,
SqlInfoResult(std::vector<std::string>({"ABORT_P"
"ABSOLUTE_P"
Expand Down

0 comments on commit 6b3097f

Please sign in to comment.