mirror of https://github.com/citusdata/citus.git
Improve btree operators for the subquery tests
This commit adds the missing comprasion for subquery composite key btree comparator.pull/1323/head
parent
5a82eb97a6
commit
fed87397ef
|
@ -501,6 +501,15 @@ BEGIN
|
||||||
RETURN -1;
|
RETURN -1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id > v2.user_id THEN
|
||||||
|
RETURN 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id < v2.user_id THEN
|
||||||
|
RETURN -1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
END;
|
END;
|
||||||
$$ language 'plpgsql' immutable
|
$$ language 'plpgsql' immutable
|
||||||
|
@ -657,6 +666,14 @@ BEGIN
|
||||||
RETURN -1;
|
RETURN -1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id > v2.user_id THEN
|
||||||
|
RETURN 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id < v2.user_id THEN
|
||||||
|
RETURN -1;
|
||||||
|
end if;
|
||||||
|
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
END;
|
END;
|
||||||
$$ language 'plpgsql' immutable
|
$$ language 'plpgsql' immutable
|
||||||
|
@ -812,6 +829,14 @@ BEGIN
|
||||||
RETURN -1;
|
RETURN -1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id > v2.user_id THEN
|
||||||
|
RETURN 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id < v2.user_id THEN
|
||||||
|
RETURN -1;
|
||||||
|
end if;
|
||||||
|
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
END;
|
END;
|
||||||
$$ language 'plpgsql' immutable
|
$$ language 'plpgsql' immutable
|
||||||
|
|
|
@ -543,6 +543,15 @@ BEGIN
|
||||||
RETURN -1;
|
RETURN -1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id > v2.user_id THEN
|
||||||
|
RETURN 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id < v2.user_id THEN
|
||||||
|
RETURN -1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
END;
|
END;
|
||||||
$$ language 'plpgsql' immutable
|
$$ language 'plpgsql' immutable
|
||||||
|
@ -673,6 +682,14 @@ BEGIN
|
||||||
RETURN -1;
|
RETURN -1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id > v2.user_id THEN
|
||||||
|
RETURN 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id < v2.user_id THEN
|
||||||
|
RETURN -1;
|
||||||
|
end if;
|
||||||
|
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
END;
|
END;
|
||||||
$$ language 'plpgsql' immutable
|
$$ language 'plpgsql' immutable
|
||||||
|
@ -803,6 +820,14 @@ BEGIN
|
||||||
RETURN -1;
|
RETURN -1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id > v2.user_id THEN
|
||||||
|
RETURN 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id < v2.user_id THEN
|
||||||
|
RETURN -1;
|
||||||
|
end if;
|
||||||
|
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
END;
|
END;
|
||||||
$$ language 'plpgsql' immutable
|
$$ language 'plpgsql' immutable
|
||||||
|
|
|
@ -543,6 +543,15 @@ BEGIN
|
||||||
RETURN -1;
|
RETURN -1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id > v2.user_id THEN
|
||||||
|
RETURN 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id < v2.user_id THEN
|
||||||
|
RETURN -1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
END;
|
END;
|
||||||
$$ language 'plpgsql' immutable
|
$$ language 'plpgsql' immutable
|
||||||
|
@ -673,6 +682,14 @@ BEGIN
|
||||||
RETURN -1;
|
RETURN -1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id > v2.user_id THEN
|
||||||
|
RETURN 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id < v2.user_id THEN
|
||||||
|
RETURN -1;
|
||||||
|
end if;
|
||||||
|
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
END;
|
END;
|
||||||
$$ language 'plpgsql' immutable
|
$$ language 'plpgsql' immutable
|
||||||
|
@ -803,6 +820,14 @@ BEGIN
|
||||||
RETURN -1;
|
RETURN -1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id > v2.user_id THEN
|
||||||
|
RETURN 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
if v1.user_id < v2.user_id THEN
|
||||||
|
RETURN -1;
|
||||||
|
end if;
|
||||||
|
|
||||||
RETURN 0;
|
RETURN 0;
|
||||||
END;
|
END;
|
||||||
$$ language 'plpgsql' immutable
|
$$ language 'plpgsql' immutable
|
||||||
|
|
Loading…
Reference in New Issue