Skip to content

Commit e62cae2

Browse files
authored
Add GitHub issues for TODO comments
* removed TODO comments that were no longer applicable (i.e., comments that seemed that should have been removed)
1 parent 42c5394 commit e62cae2

19 files changed

+51
-47
lines changed

cpp/src/arrow/flight/sql/odbc/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)
110110
set(CPACK_PACKAGE_NAME ${ODBC_PACKAGE_NAME})
111111
set(CPACK_PACKAGE_VENDOR ${ODBC_PACKAGE_VENDOR})
112112
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Arrow Flight SQL ODBC Driver")
113-
set(CPACK_PACKAGE_CONTACT "#TODO arrow maintainers")
113+
set(CPACK_PACKAGE_CONTACT "#GH-47787 TODO arrow maintainers")
114114

115-
# TODO: set up `flight_sql_odbc_lib` component for macOS Installer
116-
# TODO: set up `flight_sql_odbc_lib` component for Linux Installer
115+
# GH-47876 TODO: set up `flight_sql_odbc_lib` component for macOS Installer
116+
# GH-47877 TODO: set up `flight_sql_odbc_lib` component for Linux Installer
117117
if(WIN32)
118118
install(DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}${CMAKE_BUILD_TYPE}/"
119119
DESTINATION bin
@@ -156,8 +156,8 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)
156156
# Upgrade GUID is required to be unchanged for ODBC installer to upgrade
157157
set(CPACK_WIX_UPGRADE_GUID "DBF27A18-F8BF-423F-9E3A-957414D52C4B")
158158
endif()
159-
# TODO: create macOS Installer using cpack
160-
# TODO: create Linux Installer using cpack
159+
# GH-47876 TODO: create macOS Installer using cpack
160+
# GH-47877 TODO: create Linux Installer using cpack
161161

162162
# Load CPack after all CPACK* variables are set
163163
include(CPack)

cpp/src/arrow/flight/sql/odbc/odbc_api.cc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ SQLRETURN SQLGetDiagField(SQLSMALLINT handle_type, SQLHANDLE handle,
264264
SQLSMALLINT rec_number, SQLSMALLINT diag_identifier,
265265
SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length,
266266
SQLSMALLINT* string_length_ptr) {
267-
// TODO: Implement additional fields types
268-
// https://github.com/apache/arrow/issues/46573
267+
// GH-46573 TODO: Implement additional fields types
269268
ARROW_LOG(DEBUG) << "SQLGetDiagFieldW called with handle_type: " << handle_type
270269
<< ", handle: " << handle << ", rec_number: " << rec_number
271270
<< ", diag_identifier: " << diag_identifier
@@ -345,7 +344,7 @@ SQLRETURN SQLGetDiagField(SQLSMALLINT handle_type, SQLHANDLE handle,
345344
return SQL_SUCCESS;
346345
}
347346

348-
// TODO implement return code function
347+
// Driver manager implements SQL_DIAG_RETURNCODE
349348
case SQL_DIAG_RETURNCODE: {
350349
return SQL_SUCCESS;
351350
}
@@ -789,11 +788,10 @@ SQLRETURN SQLDriverConnect(SQLHDBC conn, SQLHWND window_handle,
789788
<< static_cast<const void*>(out_connection_string_len)
790789
<< ", driver_completion: " << driver_completion;
791790

792-
// TODO: Implement FILEDSN and SAVEFILE keywords according to the spec
793-
// https://github.com/apache/arrow/issues/46449
791+
// GH-46449 TODO: Implement FILEDSN and SAVEFILE keywords according to the spec
794792

795-
// TODO: Copy connection string properly in SQLDriverConnect according to the
796-
// spec https://github.com/apache/arrow/issues/46560
793+
// GH-46560 TODO: Copy connection string properly in SQLDriverConnect according to the
794+
// spec
797795

798796
using ODBC::ODBCConnection;
799797

@@ -810,8 +808,8 @@ SQLRETURN SQLDriverConnect(SQLHDBC conn, SQLHWND window_handle,
810808

811809
std::vector<std::string_view> missing_properties;
812810

813-
// TODO: Implement SQL_DRIVER_COMPLETE_REQUIRED in SQLDriverConnect according to the
814-
// spec https://github.com/apache/arrow/issues/46448
811+
// GH-46448 TODO: Implement SQL_DRIVER_COMPLETE_REQUIRED in SQLDriverConnect according
812+
// to the spec
815813
#if defined _WIN32 || defined _WIN64
816814
// Load the DSN window according to driver_completion
817815
if (driver_completion == SQL_DRIVER_PROMPT) {

cpp/src/arrow/flight/sql/odbc/odbc_impl/accessors/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class FlightSqlAccessor : public Accessor {
102102
throw NullWithoutIndicatorException();
103103
}
104104
} else {
105-
// TODO: Optimize this by creating different versions of MoveSingleCell
105+
// GH-47849 TODO: Optimize this by creating different versions of MoveSingleCell
106106
// depending on if str_len_buffer is null.
107107
auto row_status = MoveSingleCell(binding, current_arrow_row, i, value_offset,
108108
update_value_offset, diagnostics);

cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_auth_method.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ class NoOpAuthMethod : public FlightSqlAuthMethod {
3838
FlightCallOptions& call_options) override {
3939
// Do nothing
4040

41-
// TODO: implement NoOpAuthMethod to validate server address.
41+
// GH-46733 TODO: implement NoOpAuthMethod to validate server address.
4242
// Can use NoOpClientAuthHandler.
43-
// https://github.com/apache/arrow/issues/46733
4443
}
4544
};
4645

cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_connection.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ Location FlightSqlConnection::BuildLocation(
339339
ThrowIfNotOK(Location::ForGrpcTls(host_name_info, port).Value(&location));
340340
return location;
341341
}
342-
// TODO: We should log that we could not convert an IP to hostname here.
342+
// GH-47852 TODO: We should log that we could not convert an IP to hostname here.
343343
}
344344
} catch (...) {
345345
// This is expected. The Host attribute can be an IP or name, but make_address will

cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_get_tables_reader.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ std::shared_ptr<Schema> GetTablesReader::GetSchema() {
7777
const arrow::Result<std::shared_ptr<Schema>>& result =
7878
arrow::ipc::ReadSchema(&dataset_schema_reader, &in_memo);
7979
if (!result.ok()) {
80-
// TODO: Test and build the driver against a server that returns
80+
// GH-46561 TODO: Test and build the driver against a server that returns
8181
// complex types columns with the children
8282
// types and handle the failure properly
83-
// https://github.com/apache/arrow/issues/46561
8483
return nullptr;
8584
}
8685

cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_result_set_metadata.cc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,27 @@ size_t FlightSqlResultSetMetadata::GetLength(int column_position) {
157157
}
158158

159159
std::string FlightSqlResultSetMetadata::GetLiteralPrefix(int column_position) {
160-
// TODO: Flight SQL column metadata does not have this, should we add to the spec?
160+
// GH-47853 TODO: use `ColumnMetadata` to get literal prefix after Flight SQL protocol
161+
// adds support for it
162+
163+
// Flight SQL column metadata does not have literal prefix, empty string is returned
161164
return "";
162165
}
163166

164167
std::string FlightSqlResultSetMetadata::GetLiteralSuffix(int column_position) {
165-
// TODO: Flight SQL column metadata does not have this, should we add to the spec?
168+
// GH-47853 TODO: use `ColumnMetadata` to get literal suffix after Flight SQL protocol
169+
// adds support for it
170+
171+
// Flight SQL column metadata does not have literal suffix, empty string is returned
166172
return "";
167173
}
168174

169175
std::string FlightSqlResultSetMetadata::GetLocalTypeName(int column_position) {
170176
ColumnMetadata metadata = GetMetadata(schema_->field(column_position - 1));
171177

172-
// TODO: Is local type name the same as type name?
178+
// Local type name is for display purpose only.
179+
// Return type name as local type name as Flight SQL protocol doesn't have support for
180+
// local type name.
173181
return metadata.GetTypeName().ValueOrElse([] { return ""; });
174182
}
175183

@@ -192,7 +200,7 @@ size_t FlightSqlResultSetMetadata::GetOctetLength(int column_position) {
192200

193201
// Workaround to get the precision for Decimal and Numeric types, since server doesn't
194202
// return it currently.
195-
// TODO: Use the server precision when its fixed.
203+
// GH-47854 TODO: Use the server precision when its fixed.
196204
std::shared_ptr<DataType> arrow_type = field->type();
197205
if (arrow_type->id() == Type::DECIMAL128) {
198206
int32_t precision = util::GetDecimalTypePrecision(arrow_type);
@@ -220,7 +228,6 @@ Updatability FlightSqlResultSetMetadata::GetUpdatable(int column_position) {
220228
bool FlightSqlResultSetMetadata::IsAutoUnique(int column_position) {
221229
ColumnMetadata metadata = GetMetadata(schema_->field(column_position - 1));
222230

223-
// TODO: Is AutoUnique equivalent to AutoIncrement?
224231
return metadata.GetIsAutoIncrement().ValueOrElse([] { return false; });
225232
}
226233

cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_statement_get_columns.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ Result<std::shared_ptr<RecordBatch>> TransformInner(
101101
const auto& table_name = reader.GetTableName();
102102
const std::shared_ptr<Schema>& schema = reader.GetSchema();
103103
if (schema == nullptr) {
104-
// TODO: Test and build the driver against a server that returns
104+
// GH-46561 TODO: Test and build the driver against a server that returns
105105
// complex types columns with the children
106106
// types and handle the failure properly.
107-
// https://github.com/apache/arrow/issues/46561
108107
continue;
109108
}
110109
for (int i = 0; i < schema->num_fields(); ++i) {

cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ bool GetInfoCache::LoadInfoFromServer() {
316316
std::string server_name(
317317
reinterpret_cast<StringScalar*>(scalar->child_value().get())->view());
318318

319-
// TODO: Consider creating different properties in GetSqlInfo.
320-
// TODO: Investigate if SQL_SERVER_NAME should just be the host
319+
// GH-47855 TODO: Consider creating different properties in GetSqlInfo.
320+
// GH-47856 TODO: Investigate if SQL_SERVER_NAME should just be the host
321321
// address as well. In JDBC, FLIGHT_SQL_SERVER_NAME is only used for
322322
// the DatabaseProductName.
323323
info_[SQL_SERVER_NAME] = server_name;

cpp/src/arrow/flight/sql/odbc/odbc_impl/json_converter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class ScalarToJson : public ScalarVisitor {
221221
}
222222

223223
Status Visit(const DurationScalar& scalar) override {
224-
// TODO: Append TimeUnit on conversion
224+
// GH-47857 TODO: Append TimeUnit on conversion
225225
return ConvertScalarToStringAndWrite(scalar, writer_);
226226
}
227227

0 commit comments

Comments
 (0)