ROUND function in custom expression for TABLE CHART leads to CORE DUMP


#1

I have this error:

F0918 09:26:43.979584 21319 ExtensionsIR.cpp:197] Check failed: function_oper->getArity() <= ext_func_args.size() (2 vs. 1)
*** Check failure stack trace: ***
@ 0x1c3330a google::LogMessage::Fail()
@ 0x1c33261 google::LogMessage::SendToLog()
@ 0x1c32c2c google::LogMessage::Flush()
@ 0x1c35bc5 google::LogMessageFatal::~LogMessageFatal()
@ 0x1297b95 Executor::codegenFunctionOperCastArgs()
@ 0x1298ad0 Executor::codegenFunctionOper()
@ 0x125033f Executor::codegen()
@ 0x10f8370 GroupByAndAggregate::codegenAggArg()
@ 0x10f8bcf _ZN19GroupByAndAggregate15codegenAggCallsERKSt5tupleIJPN4llvm5ValueES3_EERKSt6vectorIS3_SaIS3_EERK18CompilationOptions
@ 0x10fbd9c GroupByAndAggregate::codegen()
@ 0x111f45e Executor::compileWorkUnit()
@ 0x10d22b2 Executor::ExecutionDispatch::compile()
@ 0x10c5335 Executor::executeWorkUnit()
@ 0x1165e81 RelAlgExecutor::executeWorkUnit()
@ 0x1166a6d RelAlgExecutor::executeCompound()
@ 0x1168f47 RelAlgExecutor::executeRelAlgStep()
@ 0x116973f RelAlgExecutor::executeRelAlgSeq()
@ 0x116ad00 RelAlgExecutor::executeRelAlgQueryNoRetry()
@ 0x116b0f5 RelAlgExecutor::executeRelAlgQuery()
@ 0xfc7b23 MapDHandler::execute_rel_alg()
@ 0xfc8b22 MapDHandler::validate_rel_alg()
@ 0xfcb10e MapDHandler::sql_validate()
@ 0xf70519 MapDProcessor::process_sql_validate()
@ 0xf0a2a7 MapDProcessor::dispatchCall()
@ 0xf03bdc apache::thrift::TDispatchProcessor::process()
@ 0x30bcd39 apache::thrift::server::TConnectedClient::run()
@ 0x3095909 apache::thrift::concurrency::ThreadManager::Task::run()
@ 0x3095d59 apache::thrift::concurrency::ThreadManager::Worker::run()
@ 0x30b7391 apache::thrift::concurrency::PthreadThread::threadMain()
@ 0x7f9047be4dc5 start_thread
@ 0x7f904635b73d __clone

[root@gecc11 mapd-ce-3.2.2]# 2017/09/18 09:26:59 http: proxy error: EOF
./startmapd: line 102: 21244 Aborted (core dumped) ./bin/mapd_server $MAPD_DATA $RO --port $MAPD_TCP_PORT --http-port $MAPD_HTTP_PORT --calcite-port MAPD_CALCITE_PORT *
./startmapd: line 1: kill: (-21243) - No such process

using the ROUND function in order to get 4 or 8 decimal values in a table chart.

The expression I’m using is:

ROUND( (SUM(val1)/SUM(val2)) , 4)

Here some values:

val1                    val2
4926.65              6888
262.08                364
165309.38          1029652


#2

MY fault, the right function is ROUND_TO_DIGIT(x, y).

Solved.