Skip to content

UDF Runner V2: Interface skeleton - #65

Draft
kratz00 wants to merge 6 commits into
mainfrom
feature/interface
Draft

kratz00 wants to merge 6 commits into
mainfrom
feature/interface

Conversation

@kratz00

@kratz00 kratz00 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@kratz00
kratz00 requested a deployment to v2-fuzzing-pr-approval September 25, 2026 09:34 — with GitHub Actions Waiting
Comment thread udf-runner-cpp/v2/include/exasol/udf/v2/call.hpp Outdated
Comment thread udf-runner-cpp/v2/include/exasol/udf/v2/context.hpp
Comment thread udf-runner-cpp/v2/include/exasol/udf/v2/message_builder.hpp Outdated
Comment thread udf-runner-cpp/v2/include/exasol/udf/v2/message_builder.hpp Outdated
Comment thread udf-runner-cpp/v2/include/exasol/udf/v2/types.hpp Outdated
@kratz00
kratz00 requested a deployment to v2-fuzzing-pr-approval September 30, 2026 07:48 — with GitHub Actions Waiting
@kratz00
kratz00 requested a deployment to v2-fuzzing-pr-approval September 30, 2026 08:35 — with GitHub Actions Waiting
@kratz00
kratz00 requested a deployment to v2-fuzzing-pr-approval September 30, 2026 12:58 — with GitHub Actions Waiting
@kratz00
kratz00 requested a deployment to v2-fuzzing-pr-approval October 8, 2026 14:08 — with GitHub Actions Waiting
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
@kratz00
kratz00 force-pushed the feature/interface branch from bfe3441 to 7dcb5bb Compare October 8, 2026 14:19
@kratz00
kratz00 requested a deployment to v2-fuzzing-pr-approval October 8, 2026 14:19 — with GitHub Actions Waiting
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
@kratz00
kratz00 force-pushed the feature/interface branch from 7dcb5bb to ca34ebe Compare October 8, 2026 14:19
@kratz00
kratz00 requested a deployment to v2-fuzzing-pr-approval October 8, 2026 14:19 — with GitHub Actions Waiting
class CallMessageView
{
public:
explicit CallMessageView(const CallMessage* value = nullptr) : value_(value)

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.

Is it really a good idea to pass CallMessage as raw pointer? Would a shared_ptr or unique_ptr be better?

Comment thread udf-runner-cpp/v2/call_message_builder.cc
/// Returns whether call-opening metadata is present.
[[nodiscard]] bool has_open_call() const noexcept;
/// Returns call-opening metadata, or null when absent.
[[nodiscard]] const OpenCall* open_call() const noexcept;

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.

I'am not sure if it's a good idea to return raw pointers here. Wouldn't it be better to return the std::optional?

@tomuben

tomuben commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

In many places you use the -> operator to access the value of a std::optional. This is against our coding style guidelines:

For std::optional, use has_value() when testing presence and value() when explicitly retrieving the contained value. Name the variable after its value, not after the fact that it is optional.

Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
@kratz00
kratz00 requested a deployment to v2-fuzzing-pr-approval October 9, 2026 11:08 — with GitHub Actions Waiting
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

TransportError
};
/// Machine-readable and human-readable operation error details.
struct ErrorInfo

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe actually use a class because the members should be constant after creation

using Timeout = std::optional<std::chrono::steady_clock::duration>;

/// Named string or binary payload.
struct Payload

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should split this file, we have general types for the interface and then types for the content

[[nodiscard]] bool has_server_capabilities() const noexcept;
/// Returns server capabilities, or an empty optional when absent.
[[nodiscard]]
std::optional<std::reference_wrapper<const ServerCapabilities>> server_capabilities()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we use the Flatbuffer object here instead of defining a new new type which we need to synchronize

/// Returns whether payloads are present.
[[nodiscard]] bool has_payloads() const noexcept;
/// Returns payloads, or an empty optional when absent.
[[nodiscard]] std::optional<std::reference_wrapper<const Payloads>> payloads() const noexcept;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we use the Flatbuffer object here instead of defining a new new type which we need to synchronize

/// Returns whether an error is present.
[[nodiscard]] bool has_error() const noexcept;
/// Returns the error, or an empty optional when absent.
[[nodiscard]] std::optional<std::reference_wrapper<const ErrorInfo>> error() const noexcept;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we use the Flatbuffer object here instead of defining a new new type which we need to synchronize

/// Returns whether connection shutdown is being started or acknowledged.
[[nodiscard]] bool has_close_connection() const noexcept;
/// Returns whether this message starts or acknowledges connection shutdown.
[[nodiscard]] bool close_connection() const noexcept;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

has_close_connection() and close_connection() are duplicated

/// Returns whether a keep-alive is present.
[[nodiscard]] bool has_keep_alive() const noexcept;
/// Returns whether this message is a keep-alive message.
[[nodiscard]] bool keep_alive() const noexcept;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

KeepAlive is a table for a reason in the Flatbuffer we should return the Flatbuffer object

This branch is waiting to be deployed

1 waiting deployment
v2-fuzzing-pr-approval — b0d2b120 Waiting Oct 9, 2026 by kratz00 via pr_approval #155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants