The Tosafot and the Rosh wrote (36b, s.v. 'bertiva') that over sugar one recites 'borei pri ha'etz,' for "my honeycomb (ya'ari) with my honey" refers to sugar. Our teacher Yonah wrote there that over sugar one recites 'borei pri ha'adamah,' and he cited this in the name of the Ba'al HaHalachot Gedolot. The Rambam in chapter 8, law 5, wrote: "The sweet canes that one squeezes and cooks their water until it congeals and resembles salt: all the Geonim say that one recites over them 'borei pri ha'adamah,' and some of them said 'borei pri ha'etz,' and similarly they said that one who sucks those canes recites 'borei pri ha'adamah.' And I say that this is not a fruit and one recites over it only 'shehakol,' so that the honey of these canes, which was changed by fire, should not be greater than the honey of dates, which was not changed by fire, and yet one recites over it 'shehakol.'" Thus far his words. The Tur disagreed with him, for this is not comparable to date honey, where the primary fruit is the dates and the honey is like all liquids that emerge from fruits; however, with sugar, the primary planting is with the intent of the honey, and this is their primary fruit, and one recites 'borei pri ha'etz,' see there. But the intent of the Rambam appears to be that he holds these canes are not in the category of fruit at all, just as the Geonim who hold to recite over them 'ha'adamah' do so because they hold this is not a tree but merely like a planting, and the Rambam holds it is not a fruit at all but merely canes that contain sweetness. The Tosafot brought proof from that which is written, "my honeycomb (ya'ari) with my honey," that it called this 'ya'ar,' which is a tree, but the Rambam holds that 'ya'ari' does not refer to 'devashi,' and this is its explanation: my honeycomb with my honey that is within the forest. And that which he wrote: "so that the honey of these canes... should not be greater than the honey of dates, etc.," this is its explanation: for certainly something that produces honey is not called a fruit, for behold, date honey is not called a fruit even though the Torah called the dates 'honey'; nevertheless, it was simple to the Rabbis that the intent is for the dates and not for the honey, and they uprooted the verse from its literal meaning, because it is not logical to say that honey is a fruit, all the more so for these canes which cannot be called a fruit because of their honey which becomes honey through cooking. Consequently, for the law we are concerned for the opinion of the Rambam and recite 'shehakol,' for with this one fulfills the obligation according to all opinions, and so ruled our teacher, the Beit Yosef, in section 15. (So it appears to me regarding the intent of the Rambam, and the Turei Zahav in subsection 13 and the Gra questioned the words of the Kesef Mishneh. And that which the Magen Avraham wrote in subsection 32, that it is similar to fruit juice, see there, it is more difficult: why are they similar to fruit juice, behold this is their primary fruit? But according to our words it settles well, and examine it closely).
כתבו התוספות והרא”ש (ל"ו: ד"ה 'ברטיבא') דעל צוקר"ו מברכינן 'בורא פרי העץ' כי 'יערי עם דבשי' זה צוקר"ו. ורבינו יונה כתב שם דעל הסוקע"ר מברכין 'בורא פרי האדמה' והביא כן משם בה"ג. והרמב"ם בפרק ח' דין ה' כתב: "הקנים המתוקים שסוחטין אותן ומבשלין מימיהן עד שיקפא וידמה למלח: כל הגאונים אומרים שמברכים עליהם 'בורא פרי האדמה' ומקצתן אמרו 'בורא פרי העץ', וכן אמרו שהמוצץ אותם קנים מברך 'בורא פרי האדמה'. ואני אומר שאין זה פירי ואין מברכין עליו אלא 'שהכל', שלא יהיה דבש אלו הקנים שנשתנה על ידי אור גדול מדבש תמרים שלא נשתנה על ידי האור, ומברכין עליו 'שהכל'" עכ"ל. והטור השיג עליו, דאין זה דמיון לדבש תמרים שעיקר הפירי הם התמרים והדבש הוי ככל משקין היוצאין מהפירות, אבל הצוקע"ר עיקר נטיעתן על דעת הדבש, וזהו עיקר פירי שלהן ומברכין 'בורא פרי העץ' ע"ש. אבל כוונת הרמב"ם נראה דסבירא ליה דקנים אלו אינם בגדר פירי כלל, וכמו דהגאונים דסבירא ליה לברך עליהם 'האדמה' משום דסבירא ליה דאין זה עץ אלא כזריעה בעלמא, והרמב"ם סבירא ליה דאינו פירי כלל אלא קנים בעלמא שיש בהם מתיקות. והתוספות הביאו ראיה מדכתיב 'יערי עם דבשי' שקרא לזה יער והוא עץ, והרמב"ם סבירא ליה ד'יערי' לא קאי א'דבשי' והכי פירושו: יערי עם דבשי שבתוך היער. וזה שכתב: "שלא יהיה דבש אלו הקנים… גדול מדבש תמרים וכו'" הכי פירושו: דוודאי דבר המוציא דבש לא מקרי פירי, שהרי דבש תמרים לא מקרי פירי אף שהתורה קראתה להתמרים 'דבש', מכל מקום פשיטא להו לרבנן דהכוונה על התמרים ולא על הדבש ועקרו הכתוב ממשמעותיה, משום דאין סברא לומר דדבש הוי פירי, קל וחומר לקנים אלו שאי אפשר לקרותן פירי מפני הדבש שלהן שנעשה דבש על ידי בישול. וממילא דלדינא חוששין לדעת הרמב"ם ומברכין 'שהכל' שבזה יוצאין לכל הדעות, וכן פסק רבינו הבית יוסף בסעיף ט"ו. (כן נראה לי בכוונת הרמב"ם, ועל דברי הכ"מ הקשה הט"ז בסקי"ג והגר"א. ומ"ש המג"א סקל"ב דדמי למי פירות ע"ש, יותר קשה, למה הם דומים למי פירות הרי זהו עיקר פירותן, ולדברינו אתי שפיר ודו"ק).