<p>You are wrong here in assuming that xgboost impute missing values to 0. Actually in case of missing values, it note the NA towards for higher gain split direction while growing tree.  </p>

<p>For example if splits without considering missing values is decided to be a variable <code>var1</code>'s (range [0,1]) value 0.5 then it calculates the gain considering var1 missing values to be &lt; 0.5 and > 0.5. To whatever split direction it gets more gain it attributes missing values to have that split direction. So missing values now have a range [0,0.5] or [0.5,1] but not actual value assigned to it (i.e. imputed).</p>

<p>For more details on this topic please refer to paper <a href="https://arxiv.org/pdf/1603.02754v3.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1603.02754v3.pdf</a></p>
XGBoost model in Spark --> Missing value treatment
<p>Unlike python, where missing value is handled internally by the XGBoost algorithm, While building XGBoost model in SPARK, the missing values are implicitly converted to 0.0(float?!). Is this okay ? There are real values that may be 0.0.How can we be sure this doesn't interfere with the model prediction abilities ? </p>