CREATE TABLE singletree_predict DISTRIBUTE BY hash(pid) AS SELECT * FROM single_tree_predict ( ON iris_attribute_test AS attribute_table PARTITION BY pid ORDER BY attribute ON iris_attribute_output as model_table DIMENSION AttrTable_GroupbyColumns ('attribute') AttrTable_pidColumns ('pid') AttrTable_valColumn ('attrvalue') ) ORDER BY pid;