PORT CHARLOTTE, Fla. -- The Tampa Bay Rays have traded All-Star designated hitter Corey Dickerson to Pittsburgh Pirates in exchange for relief pitcher Daniel Hudson, minor league infielder Tristan Gray and cash.

The 28-year-old Dickerson was designated for assignment last Saturday. He was the AL's starting DH in last summer's All-Star game, but struggled at the plate the second half of the season.

Hudson is a 30-year-old right-hander who went 2-7 with a 4.38 ERA in a career-high 71 appearances in 2017. He's 37-30 with a 3.98 career ERA over eight seasons with the Pirates, Chicago White Sox and Arizona Diamondbacks.

Hudson has 59 career starts, but primarily as a reliever since returning from a second Tommy John surgery in 2015.

Dickerson batted .282 with 27 home runs and 62 RBIs last season. He was obtained from the Colorado Rockies in January 2016 and hit .265 with 51 homers and 132 RBIs over the past two years.

Grey was a 13th-round pick of the Pirates in 2017. He spent his first pro season with Short-A West Virginia in the New York-Penn League, batting .269 with seven homers and 37 RBIs in 53 games.