public override void Bind(BindContext context) { base.Bind(context); type_ = new IntType(); // Add the first table in the scope as tableref of count(*) // because adding all of them would make the containg expression // to appear to require more than one table when that is really // not the case and may lead to attempts create a join or push // count(*) to both sides of an existing join. // This will let count(*) to be pushed to the correct node and side. List <TableRef> trefs = context.AllTableRefs(); if (trefs.Count > 0) { tableRefs_.Add(trefs[0]); } }
static ColumnType externalType2ColumnType(Type type) { ColumnType ctype; if (type == typeof(double)) { ctype = new DoubleType(); } else if (type == typeof(int)) { ctype = new IntType(); } else if (type == typeof(string)) { ctype = new VarCharType(64 * 1024); } else { throw new NotImplementedException(); } return(ctype); }
public override void Bind(BindContext context) { base.Bind(context); type_ = new IntType(); }
public HashFunc(List <Expr> args) : base("hash", args) { argcnt_ = 1; type_ = new IntType(); }