code: func truncateTableByReassignPartitionIDs(t *meta.Meta, tblInfo *model.TableInfo) error {
  	newDefs := make([]model.PartitionDefinition, 0, len(tblInfo.Partition.Definitions))
  	for _, def := range tblInfo.Partition.Definitions {
  		pid, err := t.GenGlobalID()
  		if err != nil {
  			return errors.Trace(err)
  		}
  
  		var newDef model.PartitionDefinition
  		if tblInfo.Partition.Type == model.PartitionTypeHash {
  			newDef = model.PartitionDefinition{
  				ID: pid,
  			}
  		} else if tblInfo.Partition.Type == model.PartitionTypeRange {
  			newDef = model.PartitionDefinition{
  				ID:       pid,
  				Name:     def.Name,
  				LessThan: def.LessThan,
  				Comment:  def.Comment,
  			}
  		}
  		newDefs = append(newDefs, newDef)
  	}
  	tblInfo.Partition.Definitions = newDefs
  	return nil
  }
docs: // truncateTableByReassignPartitionIDs reassigns new partition ids.