node.query("INSERT INTO testLocalJoin VALUES (1, 'a')")
node.query("INSERT INTO testS3Join VALUES (1, 'a')")
assertnode.query("SELECT joinGet('testLocalJoin', 'val', number) as local, joinGet('testS3Join', 'val', number) as s3 FROM system.numbers LIMIT 3")=="\t\na\ta\n\t\n"
assert_objects_count(cluster,1)
node.query("INSERT INTO testLocalJoin VALUES (2, 'b')")
node.query("INSERT INTO testS3Join VALUES (2, 'b')")
assertnode.query("SELECT joinGet('testLocalJoin', 'val', number) as local, joinGet('testS3Join', 'val', number) as s3 FROM system.numbers LIMIT 3")=="\t\na\ta\nb\tb\n"
assert_objects_count(cluster,2)
node.restart_clickhouse()
assertnode.query("SELECT joinGet('testLocalJoin', 'val', number) as local, joinGet('testS3Join', 'val', number) as s3 FROM system.numbers LIMIT 3")=="\t\na\ta\nb\tb\n"
node.query("TRUNCATE TABLE testLocalJoin")
node.query("TRUNCATE TABLE testS3Join")
assertnode.query("SELECT joinGet('testLocalJoin', 'val', number) as local, joinGet('testS3Join', 'val', number) as s3 FROM system.numbers LIMIT 3")=="\t\n\t\n\t\n"