File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1244,6 +1244,17 @@ std::future<void> Series::flush_impl(
12441244 internal::FlushParams const &flushParams,
12451245 bool flushIOHandler)
12461246{
1247+ if (!written () && access::readOnly (IOHandler ()->m_frontendAccess ) &&
1248+ IOHandler ()->m_work .empty ())
1249+ {
1250+ throw error::WrongAPIUsage (
1251+ " Attempting to flush the Series in Read mode even though no "
1252+ " operation has been performed yet. If this error occurs to you in "
1253+ " Access::READ_LINEAR mode, then either try using "
1254+ " Series::parseBase() or use Series::snapshots() / "
1255+ " Series::readIterations() to access the first Iteration. If this "
1256+ " occurs in Access::READ_ONLY, then this is likely a bug." );
1257+ }
12471258 IOHandler ()->m_lastFlushSuccessful = true ;
12481259 try
12491260 {
@@ -3514,7 +3525,10 @@ bool Series::randomAccessSteps() const
35143525 }
35153526 return false ;
35163527 };
3517- return iterationEncoding () == IterationEncoding::variableBased &&
3528+ return get ().m_parsePreference .value_or (
3529+ internal::ParsePreference::UpFront) ==
3530+ internal::ParsePreference::UpFront &&
3531+ iterationEncoding () == IterationEncoding::variableBased &&
35183532 randomAccess (IOHandler ()->m_backendAccess );
35193533}
35203534
You can’t perform that action at this time.
0 commit comments