B. As shown in Figure 1, in the right triangle $\triangle ABC$, it is known that $O$ is the midpoint of the hypotenuse $AB$, $CD \perp AB$ at point $D$, and $DE \perp OC$ at point $E$. If the lengths of $AD$, $DB$, and $CD$ are all rational numbers, then among the following line segments, the length that is not necessarily a rational number is ( ).
(A) $OD$
(B) $OE$
(C) $DE$
(D) $AC$
B. D.

Given that the lengths of $A D$, $D B$, and $C D$ are all rational numbers, we have
$$
O A=O B=O C=\frac{A D+B D}{2}
$$

which are rational numbers.
Thus, $O D=O A-A D$ is a rational number.
By the similarity of Rt $\triangle D O E \backsim \mathrm{Rt} \triangle C O D$, we know
$$
O E=\frac{O D^{2}}{O C}, D E=\frac{D C \cdot D O}{O C}
$$

are both rational numbers.
However, $A C=\sqrt{A D \cdot A B}$ is not necessarily a rational number.