Skip to content

Commit

Permalink
refactored variables & minor revision
Browse files Browse the repository at this point in the history
  • Loading branch information
junsklee committed Oct 30, 2024
1 parent 8e70d24 commit dbe5f8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CTP/sql_by_cci/execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ formatjoingraph (FILE * fp, char *joingraph)
{
char *str, *p;
int i, joingraphLen, newline;
bool queryplan_found = false;
int joinflag = 0;
joingraphLen = strlen (joingraph);
str = (char *) malloc (sizeof (char) * (joingraphLen + 1));
memset (str, 0, sizeof (char) * (joingraphLen + 1));
Expand Down Expand Up @@ -1211,17 +1211,17 @@ formatjoingraph (FILE * fp, char *joingraph)

if (startswith (p, "Join graph"))
{
queryplan_found = false;
joinflag = 1;
fprintf (fp, "%s", str);
continue;
}
else if (startswith (p, "Query plan:"))
{
queryplan_found = true;
joinflag = 0;
continue;
}

if (!queryplan_found)
if (joinflag == 1)
{
// hide selectivity by rewriting it as 'sel ?'
replace_substring (str, "sel [0-9]+\\.[0-9]+", "sel ?");
Expand Down

0 comments on commit dbe5f8a

Please sign in to comment.