<commit_before>CREATE FUNCTION bottom()
RETURNS TABLE (name string)
BEGIN
	RETURN select name from tables;
END;

CREATE FUNCTION leaf1()
RETURNS TABLE (name string)
BEGIN
	RETURN select name from bottom()
	UNION  select name from bottom()
	UNION  select name from bottom()
	UNION  select name from bottom();
END;

CREATE FUNCTION leaf2()
RETURNS TABLE (name string)
BEGIN
	RETURN select name from leaf1()
	UNION  select name from leaf1()
	UNION  select name from leaf1()
	UNION  select name from leaf1();
END;

CREATE FUNCTION leaf3()
RETURNS TABLE (name string)
BEGIN
	RETURN select name from leaf2()
	UNION  select name from leaf2()
	UNION  select name from leaf2()
	UNION  select name from leaf2();
END;

SELECT count(*) FROM bottom();
SELECT count(*) FROM leaf1();
SELECT count(*) FROM leaf2();
SELECT count(*) FROM leaf3();

DROP FUNCTION leaf1;
DROP FUNCTION leaf2;
DROP FUNCTION leaf3;
DROP FUNCTION bottom;<commit_msg>nestedcalls.sql: drop function in correct order acknowledging dependinces<commit_after>CREATE FUNCTION bottom()
RETURNS TABLE (name string)
BEGIN
	RETURN select name from tables;
END;

CREATE FUNCTION leaf1()
RETURNS TABLE (name string)
BEGIN
	RETURN select name from bottom()
	UNION  select name from bottom()
	UNION  select name from bottom()
	UNION  select name from bottom();
END;

CREATE FUNCTION leaf2()
RETURNS TABLE (name string)
BEGIN
	RETURN select name from leaf1()
	UNION  select name from leaf1()
	UNION  select name from leaf1()
	UNION  select name from leaf1();
END;

CREATE FUNCTION leaf3()
RETURNS TABLE (name string)
BEGIN
	RETURN select name from leaf2()
	UNION  select name from leaf2()
	UNION  select name from leaf2()
	UNION  select name from leaf2();
END;

SELECT count(*) FROM bottom();
SELECT count(*) FROM leaf1();
SELECT count(*) FROM leaf2();
SELECT count(*) FROM leaf3();

DROP FUNCTION leaf3;
DROP FUNCTION leaf2;
DROP FUNCTION leaf1;
DROP FUNCTION bottom;
{'fraction_non_alphanumeric': 0.08368200836820083, 'fraction_numerical': 0.01778242677824268, 'mean_word_length': 4.996865203761756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3623111', 'n_tokens_mistral': 605, 'n_tokens_neox': 594, 'n_words': 264}