code: protected static AbstractPlanNode getAccessPlanForTable(JoinNode tableNode) {
          StmtTableScan tableScan = tableNode.getTableScan();
          // Access path to access the data in the table (index/scan/etc).
          AccessPath path = tableNode.m_currentAccessPath;
          assert(path != null);
  
          // if no index, it is a sequential scan
          if (path.index == null) {
              return getScanAccessPlanForTable(tableScan, path);
          }
          return getIndexAccessPlanForTable(tableScan, path);
      }
docs: Given an access path, build the single-site or distributed plan that will
  assess the data from the table according to the path.
  
  @param table The table to get data from.
  @return The root of a plan graph to get the data.