Fix generate cube sql process