in client/sql/dataframe.go [171:193]
func (df *dataFrameImpl) CreateTempView(viewName string, replace bool, global bool) error {
plan := &proto.Plan{
OpType: &proto.Plan_Command{
Command: &proto.Command{
CommandType: &proto.Command_CreateDataframeView{
CreateDataframeView: &proto.CreateDataFrameViewCommand{
Input: df.relation,
Name: viewName,
Replace: replace,
IsGlobal: global,
},
},
},
},
}
responseClient, err := df.sparkSession.executePlan(plan)
if err != nil {
return fmt.Errorf("failed to create temp view %s: %w", viewName, err)
}
return consumeExecutePlanClient(responseClient)
}