Pineapple rice (菠萝饭, bo luo fan) is a preparation associated with the Dai minority people of Xishuangbanna in southern Yunnan — an ethnic Thai-adjacent group whose food culture shares more with northern Thailand and Laos than with Han Chinese cooking. Glutinous rice is cooked inside a hollowed pineapple — the rice absorbs the pineapple's juice, sugar, and fragrance during steaming, producing a rice that is fragrant, slightly sweet, and tropical in character. The technique is also used in Yunnan for stir-fried rice served inside the pineapple half.
The rice-in-pineapple method: Cut the top off a whole pineapple and hollow out the interior, leaving a 2cm shell of pineapple flesh. Reserve the extracted pineapple flesh. Soak glutinous rice 4 hours. Mix the soaked rice with the pineapple juice (squeezed from the pineapple flesh), a pinch of salt, and a small amount of coconut milk if available. Fill the hollow pineapple with the seasoned rice mixture. Replace the pineapple top. Steam the whole pineapple over boiling water for 45-60 minutes until the rice is cooked through. The stir-fried version: Cold cooked rice stir-fried with diced pineapple flesh, egg, scallion, peas, and a light soy-based seasoning, served in the pineapple shell.
Fuchsia Dunlop, Every Grain of Rice (2012)