Skip to content

Commit 6e8bf5c

Browse files
committed
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 f454d1c commit 6e8bf5c

16 files changed

+37
-31
lines changed

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ TEST(ConvertToJson, MonthInterval) {
164164
}
165165

166166
TEST(ConvertToJson, Duration) {
167-
// TODO: Append TimeUnit on conversion
167+
// GH-47857 TODO: Append TimeUnit on conversion
168168
ASSERT_EQ("\"123\"", ConvertToJson(DurationScalar(123, TimeUnit::SECOND)));
169169
ASSERT_EQ("\"123\"", ConvertToJson(DurationScalar(123, TimeUnit::MILLI)));
170170
ASSERT_EQ("\"123\"", ConvertToJson(DurationScalar(123, TimeUnit::MICRO)));

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ SQLRETURN ODBCConnection::GetInfo(SQLUSMALLINT info_type, SQLPOINTER value,
233233
case SQL_COLUMN_ALIAS:
234234
case SQL_DBMS_NAME:
235235
case SQL_DBMS_VER:
236-
case SQL_DRIVER_NAME: // TODO: This should be the driver's filename and shouldn't
237-
// come from the SPI.
236+
case SQL_DRIVER_NAME: // GH-47858 TODO: This should be the driver's filename and
237+
// shouldn't come from the SPI.
238238
case SQL_DRIVER_VER:
239239
case SQL_SEARCH_PATTERN_ESCAPE:
240240
case SQL_SERVER_NAME:

0 commit comments

Comments
 (0)