beancount> select meta(meta('t'))
ERROR: Invalid type for argument 0 of Meta: found <class 'object'> expected <class 'str'>.The error comes from EvalFunctions.__init__():
# Check each of the types. for index, (operand, intype) in enumerate(zip(operands, self.__intypes__)): if not issubclass(operand.dtype, intype): raise CompilationError( "Invalid type for argument {} of {}: found {} expected {}".format( index, type(self).__name__, operand.dtype, intype))
Perhaps this can be extended to include other EvalFunctions ? I took a shot at that and it seems to work for the given query. It's not extensively tested, but the tests under query passed.
PR: https://bitbucket.org/blais/beancount/pull-requests/88.
Let me know what you think. I can then add more tests - the only thing is that I'm not sure exactly where to add them.
Thanks!
- Shreedhar