Most important is depth of involvement of wall of esophagus and lymph node involvement of the surrounding esophageal tissue.
Length of esophagus involvement is not that important because esophagus has extensive submucosal lymph supply and for complete cure 10 cm excision margin would mean removal of almost total esophagus.