private static List<FieldInfo> getAllField(JoinScope scope){
        Iterator prefixId = scope.getChildren().iterator();
        List<FieldInfo> fieldInfoList = Lists.newArrayList();
        while(true) {
            JoinScope.ScopeChild resolved;
            BaseRowTypeInfo field;
            BaseRowTypeInfo baseRowTypeInfo;
            if(!prefixId.hasNext()) {
                return fieldInfoList;
            }

            resolved = (JoinScope.ScopeChild)prefixId.next();
            int fieldTypeLength = resolved.getBaseRowTypeInfo().getFieldTypes().length;
            if(fieldTypeLength == 2
                    && resolved.getRowTypeInfo().getFieldTypes()[1].getClass().equals(BaseRowTypeInfo.class)){
                field = (BaseRowTypeInfo) resolved.getBaseRowTypeInfo().getFieldTypes()[1];
            } else if(fieldTypeLength ==1
                    && resolved.getRowTypeInfo().getFieldTypes()[0].getClass().equals(BaseRowTypeInfo.class)){
                field = (BaseRowTypeInfo) resolved.getBaseRowTypeInfo().getFieldTypes()[0];
            }else{
                field = resolved.getBaseRowTypeInfo();
            }

            baseRowTypeInfo = field;
            String[] fieldNames = field.getFieldNames();
            TypeInformation<?>[] types = field.getFieldTypes();
            LogicalType[] logicalTypes = baseRowTypeInfo.getLogicalTypes();
            for(int i=0; i< field.getTotalFields(); i++){
                String fieldName = fieldNames[i];
                TypeInformation<?> type = types[i];
                LogicalType logicalType = logicalTypes[i];
                FieldInfo fieldInfo = new FieldInfo();
                fieldInfo.setTable(resolved.getAlias());
                fieldInfo.setFieldName(fieldName);
                fieldInfo.setTypeInformation(type);
                fieldInfo.setLogicalType(logicalType);
                fieldInfoList.add(fieldInfo);
            }
        }
    }
build row by field
@param sqlNode  select node
@param scope    join left and right table all info
@param getAll  true,get all fields from two tables; false, extract useful field from select node
@return
core/src/main/java/com/dtstack/flink/sql/side/ParserJoinField.java