コード例 #1
0
 virtual void getReturnType(ServerInterface &srvInterface, 
                            const SizedColumnTypes &input_types, 
                            SizedColumnTypes &output_types) 
     {
         for (int i = 0; i < getNumCols(); ++i)
             output_types.addArg(input_types.getColumnType(i), input_types.getColumnName(i));
             
         output_types.addInt("grouping_id");
 }
コード例 #2
0
    // Tell Vertica what our return string length will be, given the input
    // string length
    virtual void getReturnType(ServerInterface &srvInterface, 
                               const SizedColumnTypes &input_types, 
                               SizedColumnTypes &output_types)
    {
        // Error out if we're called with anything but 1 argument
        if (input_types.getColumnCount() != 2)
            vt_report_error(0, "Function only accepts 2 arguments, but %zu provided", input_types.getColumnCount());

        output_types.addArg(input_types.getColumnType(0), "val");
    }
コード例 #3
0
 virtual void getReturnType(ServerInterface &srvInterface, const SizedColumnTypes &input_types, SizedColumnTypes &output_types)
 {
     // Length matches input
     output_types.addArg(input_types.getColumnType(0), "anagram");
 }