Skip to content

Commit 3b8ba7a

Browse files
committed
Fix
1 parent 9bc6b55 commit 3b8ba7a

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

src/Client/BuzzHouse/Generator/QueryOracle.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -255,26 +255,22 @@ void QueryOracle::generateExportQuery(
255255

256256
for (const auto & entry : gen.entries)
257257
{
258-
SQLType * tp = entry.getBottomType();
259-
260258
buf += fmt::format(
261259
"{}{} {}{}{}{}",
262260
first ? "" : ", ",
263261
entry.getBottomName(),
264262
entry.path.size() > 1 ? "Array(" : "",
265-
tp->typeName(true),
263+
entry.getBottomType()->typeName(true),
266264
entry.path.size() > 1 ? ")" : "",
267265
(entry.path.size() == 1 && entry.nullable.has_value()) ? (entry.nullable.value() ? " NULL" : " NOT NULL") : "");
268-
gen.columnPathRef(entry, sel->add_result_columns()->mutable_etc()->mutable_col()->mutable_path());
269-
/// ArrowStream doesn't support UUID
270-
if (outf == OutFormat::OUT_ArrowStream && tp->getTypeClass() == SQLTypeClass::UUID)
271-
{
272-
outf = OutFormat::OUT_CSV;
273-
}
274266
first = false;
275267
}
276268
expr->mutable_lit_val()->set_string_lit(std::move(buf));
277269
}
270+
for (const auto & entry : gen.entries)
271+
{
272+
gen.columnPathRef(entry, sel->add_result_columns()->mutable_etc()->mutable_col()->mutable_path());
273+
}
278274
gen.entries.clear();
279275
ff->set_outformat(outf);
280276
if (rg.nextSmallNumber() < 4)

src/Client/BuzzHouse/Generator/SQLQuery.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,11 @@ void StatementGenerator::setTableRemote(
243243
flatTableColumnPath(to_remote_entries, t.cols, [](const SQLColumn &) { return true; });
244244
for (const auto & entry : this->remote_entries)
245245
{
246-
SQLType * tp = entry.getBottomType();
247-
248246
buf += fmt::format(
249247
"{}{} {}{}",
250248
first ? "" : ", ",
251249
entry.getBottomName(),
252-
tp->typeName(true),
250+
entry.getBottomType()->typeName(true),
253251
entry.nullable.has_value() ? (entry.nullable.value() ? " NULL" : " NOT NULL") : "");
254252
first = false;
255253
}

src/Client/BuzzHouse/Generator/StatementGenerator.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,15 +710,14 @@ void StatementGenerator::generateNextInsert(RandomGenerator & rg, Insert * ins)
710710

711711
for (const auto & entry : this->entries)
712712
{
713-
SQLType * tp = entry.getBottomType();
714713
const String & bottomName = entry.getBottomName();
715714

716715
buf += fmt::format(
717716
"{}{} {}{}{}",
718717
first ? "" : ", ",
719718
bottomName,
720719
entry.path.size() > 1 ? "Array(" : "",
721-
tp->typeName(false),
720+
entry.getBottomType()->typeName(false),
722721
entry.path.size() > 1 ? ")" : "");
723722
ssc->add_result_columns()->mutable_etc()->mutable_col()->mutable_path()->mutable_col()->set_column(bottomName);
724723
first = false;

0 commit comments

Comments
 (0)