Skip to content

Commit

Permalink
Removed call to WriteAliasedRaw which isn't supported in older versio…
Browse files Browse the repository at this point in the history
…ns of ZeroCopyStream.
  • Loading branch information
EpsilonPrime committed Jul 29, 2023
1 parent c7a43a6 commit 8920749
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/substrait/textplan/converter/SaveBinary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
#include <google/protobuf/text_format.h>
#include <google/protobuf/util/json_util.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <fstream>
#include <limits>

#include "substrait/proto/plan.pb.h"
#include "substrait/textplan/StringManipulation.h"
Expand Down Expand Up @@ -58,8 +56,7 @@ absl::Status savePlanToJson(
if (!status.ok()) {
return absl::UnknownError("Failed to save plan as a JSON protobuf.");
}
int outputLength = int(output.length() & std::numeric_limits<int>::max());
if (!stream->WriteAliasedRaw(output.data(), outputLength)) {
if (!stream->WriteCord(absl::Cord(output))) {
return absl::UnknownError("Failed to write the plan as a JSON protobuf.");
}

Expand Down

0 comments on commit 8920749

Please sign in to comment.