Skip to content

Added AMQP Decimal support to C++ AMQP stack. - #7314

Open
Larry Osterman (LarryOsterman) wants to merge 5 commits into
Azure:mainfrom
LarryOsterman:larryo/fixed_7310
Open

Added AMQP Decimal support to C++ AMQP stack.#7314
Larry Osterman (LarryOsterman) wants to merge 5 commits into
Azure:mainfrom
LarryOsterman:larryo/fixed_7310

Conversation

@LarryOsterman

Copy link
Copy Markdown
Member

Fixed issue #7310

Added support for Decimal AMQP types to the Rust and uAMQP stacks.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
8 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
8 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@LarryOsterman Larry Osterman (LarryOsterman) changed the title Larryo/fixed 7310 Added AMQP Decimal support to C++ AMQP stack. Aug 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-to-end support for AMQP decimal scalar types (decimal32/64/128) across the azure-core-amqp C++ model layer and both underlying implementations (uAMQP C vendor stack and the Rust stack), including serialization/deserialization and unit test coverage.

Changes:

  • Introduces AmqpDecimal32/64/128 aliases and new AmqpValueType variants, plus C++ AmqpValue constructors/conversions for these types.
  • Extends uAMQP vendor code to create/get/encode/decode/compare decimal values and updates stringification support.
  • Extends the Rust AMQP value model + FFI wrapper + fe2o3 conversions to handle decimal values, and adds C++ unit tests for creation, container round-trips, and serialize/deserialize.

Reviewed changes

Copilot reviewed 6 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/core/azure-core-amqp/test/ut/amqp_value_tests.cpp Adds unit tests for decimal value creation, conversion behavior, container round-trips, and serialize/deserialize.
sdk/core/azure-core-amqp/src/models/amqp_value.cpp Adds decimal type printing/mappings and C++ constructors/conversion operators for decimal values.
sdk/core/azure-core-amqp/src/impl/uamqp/vendor/azure-uamqp-c/src/amqpvalue.c Adds uAMQP decimal storage, create/get APIs, equality support, encoding, and decoding support.
sdk/core/azure-core-amqp/src/impl/uamqp/vendor/azure-uamqp-c/src/amqpvalue_to_string.c Adds uAMQP decimal formatting in amqpvalue_to_string.
sdk/core/azure-core-amqp/src/impl/uamqp/vendor/azure-uamqp-c/inc/azure_uamqp_c/amqpvalue.h Declares uAMQP decimal create/get APIs.
sdk/core/azure-core-amqp/src/impl/uamqp/vendor/azure-uamqp-c/inc/azure_uamqp_c/amqp_types.h Adds decimal AMQP types to the uAMQP internal type enum.
sdk/core/azure-core-amqp/src/impl/rust_amqp/rust_amqp/rust_wrapper/src/model/value.rs Extends Rust FFI wrapper with decimal type tagging and create/get APIs for decimals.
sdk/core/azure-core-amqp/src/impl/rust_amqp/rust_amqp/azure_core_amqp/src/value.rs Extends Rust AmqpValue enum and conversion macros for decimal arrays.
sdk/core/azure-core-amqp/src/impl/rust_amqp/rust_amqp/azure_core_amqp/src/fe2o3/value.rs Adds fe2o3 <-> AmqpValue conversions and tests for decimals.
sdk/core/azure-core-amqp/inc/azure/core/amqp/models/amqp_value.hpp Adds public C++ API surface for decimals (types, constructors, conversions) and minor formatting cleanup.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 361 to +363
AmqpValue::AmqpValue(std::uint8_t byte_value)
: m_impl{std::make_unique<AmqpValueImpl>(
_detail::UniqueAmqpValueHandle{amqpvalue_create_ubyte(byte_value)})}
_detail::UniqueAmqpValueHandle{amqpvalue_create_ubyte(byte_value)})}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot The code compiles on Windows, Linux and Mac, can you help me understand where this is a problem?

Comment thread sdk/core/azure-core-amqp/inc/azure/core/amqp/models/amqp_value.hpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants