/**
  * Constructs a FarragoReentrantSubquery.
  *
  * @param subq the subquery to evaluate
  * @param parentConverter sqlToRelConverter associated with the parent query
  * @param isExists whether the subquery is part of an EXISTS expression
  * @param isExplain whether the subquery is part of an EXPLAIN PLAN statement
  * @param results the resulting evaluated expressions
  */
 FarragoReentrantSubquery(
     SqlCall subq,
     SqlToRelConverter parentConverter,
     boolean isExists,
     boolean isExplain,
     List<RexNode> results) {
   super(
       FennelRelUtil.getPreparingStmt(parentConverter.getCluster()).getRootStmtContext(),
       parentConverter.getRexBuilder(),
       results);
   FarragoSessionStmtContext rootContext = getRootStmtContext();
   if (rootContext != null) {
     rootContext.setSaveFirstTxnCsn();
   }
   if (!isExists) {
     assert subq.getKind() == SqlKind.SCALAR_QUERY;
   }
   this.subq = subq;
   this.parentConverter = parentConverter;
   this.isExists = isExists;
   this.isExplain = isExplain;
 }