Example #1
0
            public string Format(int depth, int indentSize, string fuctionName, MethodCallExpression node)
            {
                var expr = node.Arguments[0];
                var str  = BigQueryTranslateVisitor.BuildQuery(depth, indentSize, expr);

                return(str + " WITHIN RECORD");
            }
Example #2
0
        public static FirstWindowFunction <T, TColumn> Lead <T, TColumn>(T fieldSource, Expression <Func <T, TColumn> > columnSelector, int offset)
        {
            var arg1 = BigQueryTranslateVisitor.BuildQuery(0, 0, columnSelector);

            return(new FirstWindowFunction <T, TColumn>("LEAD", arg1 + ", " + offset));
        }
Example #3
0
        public static FirstWindowFunction <T, TColumn> Lag <T, TColumn>(T fieldSource, Expression <Func <T, TColumn> > columnSelector, int offset, TColumn defaultValue)
        {
            var arg1 = BigQueryTranslateVisitor.BuildQuery(0, 0, columnSelector);

            return(new FirstWindowFunction <T, TColumn>("LAG", arg1 + ", " + offset + ", " + DataTypeFormatter.Format(defaultValue)));
        }
Example #4
0
        public static FirstWindowFunction <T, TColumn> Max <T, TColumn>(T fieldSource, Expression <Func <T, TColumn> > columnSelector)
        {
            var arg1 = BigQueryTranslateVisitor.BuildQuery(0, 0, columnSelector);

            return(new FirstWindowFunction <T, TColumn>("MAX", arg1));
        }
Example #5
0
        public static FirstWindowFunction <T, double> RatioToReport <T, TColumn>(T fieldSource, Expression <Func <T, TColumn> > columnSelector)
        {
            var arg1 = BigQueryTranslateVisitor.BuildQuery(0, 0, columnSelector);

            return(new FirstWindowFunction <T, double>("RATIO_TO_REPORT", arg1));
        }
Example #6
0
        public static FirstWindowFunction <T, TColumn> NthValue <T, TColumn>(T fieldSource, Expression <Func <T, TColumn> > columnSelector, int n)
        {
            var arg1 = BigQueryTranslateVisitor.BuildQuery(0, 0, columnSelector);

            return(new FirstWindowFunction <T, TColumn>("NTH_VALUE", arg1 + ", " + n));
        }