NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
Base class for all input data parsers in NES. More...
#include <Parser.hpp>
Public Member Functions | |
Parser (std::vector< PhysicalTypePtr > physicalTypes) | |
public constructor for input data parser More... | |
virtual | ~Parser ()=default |
virtual bool | writeInputTupleToTupleBuffer (std::string_view inputTuple, uint64_t tupleCount, Runtime::MemoryLayouts::TestTupleBuffer &tupleBuffer, const SchemaPtr &schema, const Runtime::BufferManagerPtr &bufferManager)=0 |
takes a tuple as string, casts its values to the correct types and writes it to the TupleBuffer More... | |
void | writeFieldValueToTupleBuffer (std::string value, uint64_t schemaFieldIndex, Runtime::MemoryLayouts::TestTupleBuffer &tupleBuffer, const SchemaPtr &schema, uint64_t tupleCount, const Runtime::BufferManagerPtr &bufferManager) |
casts a value in string format to the correct type and writes it to the TupleBuffer More... | |
Base class for all input data parsers in NES.
|
explicit |
public constructor for input data parser
physicalTypes | vector with physical data types |
|
virtualdefault |
void NES::Parser::writeFieldValueToTupleBuffer | ( | std::string | value, |
uint64_t | schemaFieldIndex, | ||
Runtime::MemoryLayouts::TestTupleBuffer & | tupleBuffer, | ||
const SchemaPtr & | schema, | ||
uint64_t | tupleCount, | ||
const Runtime::BufferManagerPtr & | bufferManager | ||
) |
casts a value in string format to the correct type and writes it to the TupleBuffer
value | string value that is cast to the PhysicalType and written to the TupleBuffer |
schemaFieldIndex | field/attribute that is currently processed |
tupleBuffer | the TupleBuffer to which the value is written containing the currently chosen memory layout |
json | denotes whether input comes from JSON for correct parsing |
schema | the schema the data are supposed to have |
tupleCount | current tuple count, i.e. how many tuples have already been produced |
bufferManager | the buffer manager |
References NES::BasicPhysicalType::BOOLEAN, NES::BasicPhysicalType::CHAR, NES::BasicPhysicalType::DOUBLE, NES::Util::findAndReplaceAll(), NES::BasicPhysicalType::FLOAT, NES::DefaultPhysicalTypeFactory::getPhysicalType(), NES::BasicPhysicalType::INT_16, NES::BasicPhysicalType::INT_32, NES::BasicPhysicalType::INT_64, NES::BasicPhysicalType::INT_8, NES_ERROR, NES_FATAL_ERROR, NES_TRACE, NES::BasicPhysicalType::UINT_16, NES::BasicPhysicalType::UINT_32, NES::BasicPhysicalType::UINT_64, NES::BasicPhysicalType::UINT_8, NES::BasicPhysicalType::UNDEFINED, and magic_enum::detail::value().
Referenced by NES::CSVParser::writeInputTupleToTupleBuffer(), and NES::JSONParser::writeInputTupleToTupleBuffer().
|
pure virtual |
takes a tuple as string, casts its values to the correct types and writes it to the TupleBuffer
inputTuple | string value that is cast to the PhysicalType and written to the TupleBuffer |
tupleCount | the number of tuples already written to the current TupleBuffer |
tupleBuffer | the TupleBuffer to which the value is written containing the currently chosen memory layout |
schema | data schema |
bufferManager | the buffer manager |
Implemented in NES::JSONParser, NES::CSVParser, and NES::NESBinaryParser.