message: tidy up now using ScalarMacroFunction and TableMacroFunction
diff: -#include "duckdb/function/macro_function.hpp"
  #include "duckdb/parser/parsed_data/create_macro_info.hpp"
  #include "duckdb/parser/statement/create_statement.hpp"
  #include "duckdb/parser/expression/comparison_expression.hpp"
  #include "duckdb/parser/transformer.hpp"
  +#include "duckdb/function/scalar_macro_function.hpp"
  +#include "duckdb/function/table_macro_function.hpp"
  +
  +
  namespace duckdb {
  unique_ptr<CreateStatement> Transformer::TransformCreateFunction(duckdb_libpgquery::PGNode *node) {
  @@ -12,24 +15,25 @@ unique_ptr<CreateStatement> Transformer::TransformCreateFunction(duckdb_libpgque
  auto stmt = reinterpret_cast<duckdb_libpgquery::PGCreateFunctionStmt *>(node);
  D_ASSERT(stmt);
  + D_ASSERT(stmt->function || stmt->query);
  auto result = make_unique<CreateStatement>();
  - auto info = make_unique<CreateMacroInfo>();
  -
  auto qname = TransformQualifiedName(stmt->name);
  - info->schema = qname.schema;
  - info->name = qname.name;
  +
  + unique_ptr<MacroFunction> macro_func; ;
  // function can be null here
  - auto function = TransformExpression(stmt->function);
  - auto macro_func = make_unique<MacroFunction>(move(function));
  + if(stmt->function) {
  + macro_func= make_unique<ScalarMacroFunction>( move (TransformExpression(stmt->function)));
  + } else if(stmt->query ) {
  + macro_func = make_unique<TableMacroFunction>(move (TransformSelect(stmt->query, true)->node));
  - // function is a query
  - if (stmt->query) {
  - macro_func->query_node = TransformSelect(stmt->query, true)->node->Copy();
  }
  - D_ASSERT(stmt->function || stmt->query);
  + auto info = make_unique<CreateMacroInfo>( (stmt->function? CatalogType::MACRO_ENTRY : CatalogType::TABLE_MACRO_ENTRY) );
  + info->schema = qname.schema;
  + info->name = qname.name;
  +
  if (stmt->params) {
  vector<unique_ptr<ParsedExpression>> parameters;
  @@ -58,6 +62,7 @@ unique_ptr<CreateStatement> Transformer::TransformCreateFunction(duckdb_libpgque
  info->function = move(macro_func);
  result->info = move(info);
  +
  return result;
  }
  