You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by Wes McKinney <we...@gmail.com> on 2017/09/05 16:49:23 UTC

Extra Arrow debugging context in C++

For anyone doing C, C++ and/or Python development, I want to make sure
you see ARROW-1401, which generates "stack traces" from error
Statuses:

../src/arrow/ipc/ipc-read-write-test.cc:609: Failure
Failed
NotImplemented: ../src/arrow/ipc/ipc-read-write-test.cc:574 code:
writer->WriteRecordBatch(batch)
../src/arrow/ipc/writer.cc:778 code: CheckStarted()
../src/arrow/ipc/writer.cc:755 code: schema_writer.Write(&dictionaries_)
../src/arrow/ipc/writer.cc:730 code: WriteSchema()
../src/arrow/ipc/writer.cc:697 code: WriteSchemaMessage(schema_,
dictionary_memo_, &schema_fb)
../src/arrow/ipc/metadata-internal.cc:651 code:
SchemaToFlatbuffer(fbb, schema, dictionary_memo, &fb_schema)
../src/arrow/ipc/metadata-internal.cc:598 code: FieldToFlatbuffer(fbb,
*schema.field(i), dictionary_memo, &offset)
../src/arrow/ipc/metadata-internal.cc:508 code: TypeToFlatbuffer(fbb,
*field.type(), &children, &layout, &type_enum, dictionary_memo,
&type_offset)
Unable to convert type: decimal(19, 4)

This is implemented using macros, and can be turned on with
-DARROW_EXTRA_ERROR_CONTEXT=ON. It will increase compiled code size
and probably make performance worse in release builds (it would be
nice to know by how much), so it is not enabled by default.

We could also implement this using stack unwinding, but this has the
benefit of being simple and also platform independent.

- Wes