Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/Series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,17 @@ std::future<void> Series::flush_impl(
internal::FlushParams const &flushParams,
bool flushIOHandler)
{
if (!written() && access::readOnly(IOHandler()->m_frontendAccess) &&
IOHandler()->m_work.empty())
{
throw error::WrongAPIUsage(
"Attempting to flush the Series in Read mode even though no "
"operation has been performed yet. If this error occurs to you in "
"Access::READ_LINEAR mode, then either try using "
"Series::parseBase() or use Series::snapshots() / "
"Series::readIterations() to access the first Iteration. If this "
"occurs in Access::READ_ONLY, then this is likely a bug.");
}
IOHandler()->m_lastFlushSuccessful = true;
try
{
Expand Down Expand Up @@ -3514,7 +3525,10 @@ bool Series::randomAccessSteps() const
}
return false;
};
return iterationEncoding() == IterationEncoding::variableBased &&
return get().m_parsePreference.value_or(
internal::ParsePreference::UpFront) ==
internal::ParsePreference::UpFront &&
iterationEncoding() == IterationEncoding::variableBased &&
randomAccess(IOHandler()->m_backendAccess);
}

Expand Down
Loading