By default, the scope of a JVM used to run a SQL-MapReduce function is the life of the query that calls the function. Any artifact in the JVM memory exists for the life of a query. Therefore, an IMDC used in a SQL-MapReduce function is visible to all SQL-MapReduce functions running within the same query.
However, a primary use case for IMDCs is a SQL-MapReduce function that issues the same query iteratively. This scenario is common in Aster Analytics. In this situation, you want to populate an IMDC and share it across query iterations, which requires a session-scoped JVM. A session-scoped JVM exists for the life of the session, during which time it maintains any memory state. This allows creating and populating an IMDC once and then sharing it across queries within the same session.