Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some proposed updates / changes to nautilus #76

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

keyseven123
Copy link
Contributor

I am proposing some changes to nautilus that I have come across while implementing a windowed aggregation in NebulaStream.
The first commit is a breaking change and should be part of the main. For the other two commits, they are up to debate IMHO.

@keyseven123 keyseven123 self-assigned this Jan 13, 2025
nautilus/include/nautilus/val_ptr.hpp Show resolved Hide resolved
@@ -242,6 +257,11 @@ val<ValueType> inline operator+(val<ValueType>& left, IndexType offset) {
return left + val<size_t>(offset);
}

template <is_ptr ValueType, is_integral IndexType>
val<ValueType> inline operator+(val<ValueType>& left, static_val<IndexType> offset) {
Copy link
Member

Choose a reason for hiding this comment

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

do we really need this? could this not be implemented by the cast operator of static_val?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How would this cast be then reflected in the nautilus code?

nautilus::static_val<uint64_t> minKeyOffset = std::numeric_limits<uint64_t>::max();
    for (const auto& field : nautilus::static_iterable(fields))
    {
        const auto offset = field.fieldOffset;
        if (minKeyOffset > offset)
        {
            minKeyOffset = offset;
        }
    }
    auto castedMemArea = static_cast<nautilus::val<int8_t*>>(entryRef);
    /// I want this addition to be of a val<int8_t*> and a constant in the traced/compiled code
    auto valueMemArea = castedMemArea + minKeyOffset;
}

nautilus/src/nautilus/tracing/phases/SSACreationPhase.hpp Outdated Show resolved Hide resolved
Also added a missing declaration in nautilus::val<ptr> so that it can be used with tracing enabled and also disabled

Signed-off-by: Nils Schubert <nilslpschubert@gmail.com>
Signed-off-by: Nils Schubert <nilslpschubert@gmail.com>
Signed-off-by: Nils Schubert <nilslpschubert@gmail.com>
Copy link
Member

@PhilippGrulich PhilippGrulich left a comment

Choose a reason for hiding this comment

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

LGTM

@PhilippGrulich PhilippGrulich merged commit 364c89c into main Jan 20, 2025
13 checks passed
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.

2 participants