@@ -188,7 +188,9 @@ func newALPSTrainFiller(pr *extendedSelect, db *DB, session *pb.Session, ds *tra
188188
189189 // TODO(joyyoj) read feature mapping table's name from table attributes.
190190 // TODO(joyyoj) pr may contains partition.
191- fmap := columns.FeatureMap {pr .tables [0 ] + "_feature_map" , "" }
191+ fmap := columns.FeatureMap {
192+ Table : pr .tables [0 ] + "_feature_map" ,
193+ Partition : "" }
192194 var meta metadata
193195 fields := make ([]string , 0 )
194196 if db != nil {
@@ -670,22 +672,22 @@ func (meta *metadata) getDenseColumnInfo(keys []string, refColumns map[string]*c
670672 shape [0 ] = len (fields )
671673 if userSpec , ok := refColumns [ct .Name ()]; ok {
672674 output [ct .Name ()] = & columns.ColumnSpec {
673- ct .Name (),
674- false ,
675- shape ,
676- userSpec .DType ,
677- userSpec .Delimiter ,
678- nil ,
679- * meta .featureMap }
675+ ColumnName : ct .Name (),
676+ IsSparse : false ,
677+ Shape : shape ,
678+ DType : userSpec .DType ,
679+ Delimiter : userSpec .Delimiter ,
680+ Vocabulary : nil ,
681+ FeatureMap : * meta .featureMap }
680682 } else {
681683 output [ct .Name ()] = & columns.ColumnSpec {
682- ct .Name (),
683- false ,
684- shape ,
685- "float" ,
686- "," ,
687- nil ,
688- * meta .featureMap }
684+ ColumnName : ct .Name (),
685+ IsSparse : false ,
686+ Shape : shape ,
687+ DType : "float" ,
688+ Delimiter : "," ,
689+ Vocabulary : nil ,
690+ FeatureMap : * meta .featureMap }
689691 }
690692 }
691693 }
@@ -732,7 +734,14 @@ func (meta *metadata) getSparseColumnInfo() (map[string]*columns.ColumnSpec, err
732734 column , present := output [* name ]
733735 if ! present {
734736 shape := make ([]int , 0 , 1000 )
735- column := & columns.ColumnSpec {* name , true , shape , "int64" , "" , nil , * meta .featureMap }
737+ column := & columns.ColumnSpec {
738+ ColumnName : * name ,
739+ IsSparse : true ,
740+ Shape : shape ,
741+ DType : "int64" ,
742+ Delimiter : "" ,
743+ Vocabulary : nil ,
744+ FeatureMap : * meta .featureMap }
736745 column .DType = "int64"
737746 output [* name ] = column
738747 }
0 commit comments