/// <summary>
        ///
        /// </summary>
        /// <param name="fn"></param>
        /// <returns></returns>
        private Join buildJoin(Join fn)
        {
            var gVal  = getValue(FunDefination.fun, _current.Value);
            var items = split(FunDefination.splitbyComma, gVal);
            // foreach (string item in items) {
            var s1 = items[0];
            var s2 = items[1];

            fn.Datasource = s1;
            var relation = items[2].Replace("[", "").Replace("]", "");
            var rs       = splitWithSpace(relation);

            if (rs.Count == 3)
            {
                var left  = rs[0];
                var right = rs[2];
                var opr   = rs[1];

                var ld  = "";
                var ldf = "";
                var rd  = "";
                var rdf = "";
                if (Scan(@"(\w*?:\w*)", left))
                {
                    var condition = split(":", left).ToList();
                    if (condition.Count == 2)
                    {
                        ld  = condition[0];
                        ldf = condition[1];
                        if (s1 != ld && s2 != ld)
                        {
                            AddError(Source.Severity.Error, "datasource not exist in the relationship : " + ld, _current.Span);
                        }
                    }
                    else
                    {
                        AddError(Source.Severity.Error, "invalid relationship : " + left, _current.Span);
                    }
                }
                if (Scan(@"(\w*?:\w*)", right))
                {
                    var condition = split(":", right).ToList();
                    if (condition.Count == 2)
                    {
                        rd  = condition[0];
                        rdf = condition[1];
                        if (s1 != rd && s2 != rd)
                        {
                            AddError(Source.Severity.Error, "datasource not exist in the relationship : " + rd, _current.Span);
                        }
                    }
                    else
                    {
                        AddError(Source.Severity.Error, "invalid relationship : " + left, _current.Span);
                    }
                }
                if (scanOperator(opr) == Syntax.Query.WhereOperators.none)
                {
                    fn.AddRelation(ld, ldf, rd, rdf, scanOperator(opr));
                }
            }
            //}
            return(fn);
        }