docs: public static Object partitionValueFromInvocation(Table catTable, VoltTable table) throws Exception {
          if (catTable.getIsreplicated()) {
              throw new Exception("Target table for LoadSinglepartitionTable is replicated.");
          }
  
          // check the number of columns
          int colCount = catTable.getColumns().size();
          if (table.getColumnCount() != colCount) {
              throw new Exception("Input table has the wrong number of columns for bulk insert.");
          }
  
          // note there's no type checking
  
          // get the partitioning info from the catalog
          Column pCol = catTable.getPartitioncolumn();
          int pIndex = pCol.getIndex();
  
          // make sure the table has one row and move to it
          table.resetRowPosition();
          boolean hasRow = table.advanceRow();
          if (!hasRow) {
              // table has no rows, so it can partition any which way
              return 0;
          }
  
          // get the value from the first row of the table at the partition key
          Object pvalue = table.get(pIndex, table.getColumnType(pIndex));
          return pvalue;
      }