Skip to content

Commit a4ade50

Browse files
committed
MERGE: Add impedance matching, reduce probability.
1 parent f9008a7 commit a4ade50

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

grammar.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,8 @@ shared_ptr<prod> statement_factory(struct scope *s)
467467
{
468468
try {
469469
s->new_stmt();
470-
return make_shared<merge_stmt>((struct prod *)0, s);
470+
if (d42() == 1)
471+
return make_shared<merge_stmt>((struct prod *)0, s);
471472
if (d42() == 1)
472473
return make_shared<insert_stmt>((struct prod *)0, s);
473474
else if (d42() == 1)
@@ -539,7 +540,7 @@ void common_table_expression::out(std::ostream &out)
539540

540541
merge_stmt::merge_stmt(prod *p, struct scope *s, table *v)
541542
: modifying_stmt(p,s,v) {
542-
543+
match();
543544
target_table_ = make_shared<target_table>(this, victim);
544545
data_source = table_ref::factory(this);
545546
// join_condition = join_cond::factory(this, *target_table_, *data_source);

0 commit comments

Comments
 (0)