aboutsummaryrefslogtreecommitdiff
path: root/dump/special-forms.scm
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-07-19 14:43:42 +0300
committerBonfaceKilz2023-07-30 12:29:56 +0300
commit1ed71a5bc2ec25d036aa0693afbb252328ca0421 (patch)
treec5a0ee9cc1c727cb396930480217ff655c957959 /dump/special-forms.scm
parent54b54584215289dd394c1935aaa2775afd6c2863 (diff)
downloadgn-transform-databases-1ed71a5bc2ec25d036aa0693afbb252328ca0421.tar.gz
Use a min of 4 should the schema triples be many
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'dump/special-forms.scm')
-rw-r--r--dump/special-forms.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/dump/special-forms.scm b/dump/special-forms.scm
index a356783..39c8c80 100644
--- a/dump/special-forms.scm
+++ b/dump/special-forms.scm
@@ -496,8 +496,9 @@ The above query results to triples that have the form:
tables-raw ...)))
#,@(field->key #'(predicate-clauses ...))))
(first-n (list-head result
- (let ((n (truncate
- (+ (max (exact-integer-sqrt (length result))) 1))))
+ (let ((n
+ (min 4 (truncate
+ (+ (exact-integer-sqrt (length result)) 1)))))
(if (< n 3)
(length result)
n)))))