Open davidhcar opened 1 year ago
can't rewrite as a join because we're getting a list of conceptIDs to lookup, so one way or another we're going to be needing an IN, we just need to partition.
I thought we already did partition out the set of conceptIDs we fetch from the record count....but I could be remembering something else. Therefore, we need a dialect-specific maximum that we can partition the IN clause and perform multiple queries for each partition.
Thank you @chrisknoll. Looking for ward to this partition work..
I think the changes required for this issue need to happen here:
There may be other changes beyond this one function but at the moment there is a gap where Snowflake is not handled.
@davidhcar is it possible for you to pull down the branch referenced in the referenced PR and try to run the operation using that branch? We don't have an internal Snowflake environment to verify.
@chrisknoll Thank you for the fix! I can test this out. Will let you know.
Expected behavior
Return result set for the following SQL query,
Actual behavior
Total number of records under tab 'Included Source Codes' has 69,523 records
Steps to reproduce behavior
Under Concept Sets --> tab 'Included Source Codes' when this list exceeds 16,384 the above SQL exception from Snowflake thrown.
The recommendation from snowflake is, rewrite this query with JOIN statement, https://community.snowflake.com/s/article/maxi-expressions-exceeded