edponce commented on a change in pull request #11587: URL: https://github.com/apache/arrow/pull/11587#discussion_r740737959
########## File path: c_glib/arrow-glib/decimal.cpp ########## @@ -60,11 +60,18 @@ struct DecimalConverter<arrow::Decimal256> { template <typename Decimal> typename DecimalConverter<Decimal>::GArrowType * -garrow_decimal_new_string(const gchar *data) -{ - auto arrow_decimal = std::make_shared<Decimal>(data); - DecimalConverter<Decimal> converter; - return converter.new_raw(&arrow_decimal); +garrow_decimal_new_string(const gchar *data, + GError **error, + const gchar *tag) +{ + auto arrow_decimal_result = Decimal::FromString(data); + if (garrow::check(error, arrow_decimal_result, tag)) { + auto arrow_decimal = std::make_shared<Decimal>(*arrow_decimal_result); + DecimalConverter<Decimal> converter; + return converter.new_raw(&arrow_decimal); + } else { + return nullptr; + } Review comment: Simple observation: Other functions return `NULL` instead of `nullptr`. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org