Fundamentals: Warnings
SamtSQL surfaces advisory warnings to help you discover anti-patterns in queries. Such warnings are shown in the web interface or returned in the JSON response when using the REST API.
REPEATED_AI_CALL
The same AI call (identical post-qualification SQL) appears more than once in the query. Each occurrence is computed and billed independently.
Recommended fix: keep the AI call to a single occurrence by materializing it in a subquery / CTE alias and reusing that alias.
LIMIT_WITHOUT_COMPLETENESS_GUARD
The query has an explicit LIMIT and at least one AI call that lives in the outer SELECT in a non-filter position (typically the projection or ORDER BY). The engine's row-count termination may stop before any row is fully processed.
Recommended fix: move the AI call to an inner sub-query, and add an explicit NOT NULL check in the outer query. See Partial Query Results for best practices on how to write samtSQL queries, taking into account partial results.