Skip to content

Commit

Permalink
[AVRO-4084][C++] Fix bad filesystem::path conversion type on windows (#…
Browse files Browse the repository at this point in the history
…3220)

Co-authored-by: blissful <[email protected]>
  • Loading branch information
glywk and blissful authored Oct 25, 2024
1 parent 0434f44 commit ed85a81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lang/c++/test/CommonsSchemasTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ void testCommonSchema(const std::filesystem::path &dir_path) {
GenericDatum datum(schema);
const std::filesystem::path &outputDataFile = dir_path / "data_out.avro";

DataFileReader<GenericDatum> reader(dataFile.c_str());
DataFileWriter<GenericDatum> writer(outputDataFile.c_str(), schema);
DataFileReader<GenericDatum> reader(dataFile.string().c_str());
DataFileWriter<GenericDatum> writer(outputDataFile.string().c_str(), schema);

while (reader.read(datum)) {
datum.value<avro::GenericRecord>();
Expand All @@ -54,8 +54,8 @@ void testCommonSchema(const std::filesystem::path &dir_path) {
GenericDatum datumOrig(schema);
GenericDatum datumNew(schema);

DataFileReader<GenericDatum> readerOrig(dataFile.c_str());
DataFileReader<GenericDatum> readerNew(outputDataFile.c_str());
DataFileReader<GenericDatum> readerOrig(dataFile.string().c_str());
DataFileReader<GenericDatum> readerNew(outputDataFile.string().c_str());
while (readerOrig.read(datumOrig)) {
BOOST_CHECK(readerNew.read(datumNew));
avro::GenericRecord &rec1 = datumOrig.value<avro::GenericRecord>();
Expand Down

0 comments on commit ed85a81

Please sign in to comment.