docs: Expression XreadSimpleValueExpressionPrimary() {
  
          Expression e;
  
          e = XreadUnsignedValueSpecificationOrNull();
  
          if (e != null) {
              return e;
          }
  
          switch (token.tokenType) {
  
              case Tokens.OPENBRACKET :
                  int position = getPosition();
  
                  read();
  
                  int subqueryPosition = getPosition();
  
                  readOpenBrackets();
  
                  switch (token.tokenType) {
  
                      case Tokens.TABLE :
                      case Tokens.VALUES :
                      case Tokens.SELECT :
                          SubQuery sq = null;
  
                          rewind(subqueryPosition);
  
                          try {
                              sq = XreadSubqueryBody(false,
                                                     OpTypes.SCALAR_SUBQUERY);
  
                              readThis(Tokens.CLOSEBRACKET);
                          } catch (HsqlException ex) {
                              compileContext.resetSubQueryLevel();
                              ex.setLevel(compileContext.subQueryDepth);
  
                              if (lastError == null
                                      || lastError.getLevel() < ex.getLevel()) {
                                  lastError = ex;
                              }
  
                              rewind(position);
  
                              return null;
                          }
  
                          // A VoltDB extension to adapt to the hsqldb 2.3.2 change for fuller subquery support.
                          SubQuery td = sq;
                          // End of VoltDB extension
                          // BEGIN Cherry-picked code change from hsqldb-2.3.2
                          if (td.queryExpression.isSingleColumn()) {
                              e = new Expression(OpTypes.SCALAR_SUBQUERY, td);
                          } else {
                              e = new Expression(OpTypes.ROW_SUBQUERY, td);
                          }
  
                          return e;
                          /* Disable 5 lines ...
                          if (!sq.queryExpression.isSingleColumn()) {
                              throw Error.error(ErrorCode.W_01000);
                          }
  
                          return new Expression(OpTypes.SCALAR_SUBQUERY, sq);
                          ... disabled 5 lines. */
                          // END Cherry-picked code change from hsqldb-2.3.2
  
                      default :
                          rewind(position);
  
                          return null;
                  }
              case Tokens.ASTERISK :
                  e = new ExpressionColumn(token.namePrePrefix,
                                           token.namePrefix);
  
                  recordExpressionForToken((ExpressionColumn) e);
                  read();
  
                  return e;
  
              case Tokens.CASEWHEN :
                  return readCaseWhenExpression();
  
              case Tokens.CASE :
                  return readCaseExpression();
  
              case Tokens.NULLIF :
                  return readNullIfExpression();
  
              case Tokens.COALESCE :
              case Tokens.IFNULL :
                  return readCoalesceExpression();
  
              case Tokens.CAST :
              case Tokens.CONVERT :
                  return readCastExpression();
  
              case Tokens.DATE :
              case Tokens.TIME :
              case Tokens.TIMESTAMP :
              case Tokens.INTERVAL :
                  e = readDateTimeIntervalLiteral();
  
                  if (e != null) {
                      return e;
                  }
                  break;
  
              case Tokens.ANY :
              case Tokens.SOME :
              case Tokens.EVERY :
              case Tokens.COUNT :
              case Tokens.APPROX_COUNT_DISTINCT :
              case Tokens.MAX :
              case Tokens.MIN :
              case Tokens.SUM :
              case Tokens.AVG :
              case Tokens.STDDEV_POP :
              case Tokens.STDDEV_SAMP :
              case Tokens.VAR_POP :
              case Tokens.VAR_SAMP :
              case Tokens.RANK :
              case Tokens.DENSE_RANK:
              case Tokens.ROW_NUMBER:
                  return readAggregate();
  
              case Tokens.NEXT :
                  return readSequenceExpression();
  
              case Tokens.LEFT :
              case Tokens.RIGHT :
                  // CLI function names
                  break;
  
  
              default :
                  if (isCoreReservedKey()) {
                      throw unexpectedToken();
                  }
          }
  
          return readColumnOrFunctionExpression();
      }