```
:) select toInt256(inf)
Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000



#129770 0x00007fffea0f5fac in wide::integer<256ul, int>::_impl::set_multiplier<double> (self=..., t=inf) at /home/akuzm/ch2/ch/base/common/../common/wide_integer_impl.h:247
#129771 0x00007fffea0f5fac in wide::integer<256ul, int>::_impl::set_multiplier<double> (self=..., t=inf) at /home/akuzm/ch2/ch/base/common/../common/wide_integer_impl.h:247
#129772 0x00007fffea0f5fac in wide::integer<256ul, int>::_impl::set_multiplier<double> (self=..., t=inf) at /home/akuzm/ch2/ch/base/common/../common/wide_integer_impl.h:247
#129773 0x00007fffea0f5fac in wide::integer<256ul, int>::_impl::set_multiplier<double> (self=..., t=inf) at /home/akuzm/ch2/ch/base/common/../common/wide_integer_impl.h:247
#129774 0x00007fffea0f5fac in wide::integer<256ul, int>::_impl::set_multiplier<double> (self=..., t=inf) at /home/akuzm/ch2/ch/base/common/../common/wide_integer_impl.h:247
#129775 0x00007fffea0f5e7b in wide::integer<256ul, int>::_impl::set_multiplier<long double> (self=..., t=inf) at /home/akuzm/ch2/ch/base/common/../common/wide_integer_impl.h:247
#129776 0x00007fffea0f5d69 in wide::integer<256ul, int>::_impl::wide_integer_from_bultin (self=..., rhs=inf) at /home/akuzm/ch2/ch/base/common/../common/wide_integer_impl.h:278
#129777 0x00007fffea0f5c99 in wide::integer<256ul, int>::integer<double> (this=0x7ffef70e9da8, rhs=inf) at /home/akuzm/ch2/ch/base/common/../common/wide_integer_impl.h:927
#129778 0x00007fffea0f5c50 in bigint_cast<wide::integer<256ul, int>, double> (x=@0x7fff1cc9e010: inf) at /home/akuzm/ch2/ch/base/common/../common/extended_types.h:110
#129779 0x00007fffea0f5a20 in DB::ConvertImpl<DB::DataTypeNumber<double>, DB::DataTypeNumber<wide::integer<256ul, int> >, DB::NameToInt256>::execute<void*> (arguments=..., additions=0x0) at /home/akuzm/ch2/ch/src/Functions/FunctionsConversion.h:157
#129780 0x00007fffea0f2492 in DB::FunctionConvert<DB::DataTypeNumber<wide::integer<256ul, int> >, DB::NameToInt256, DB::ToNumberMonotonicity<wide::integer<256ul, int> > >::executeInternal(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const::{lambda(auto:1 const&)#1}::operator()<DB::TypePair<DB::DataTypeNumber<double>, DB::DataTypeNumber<wide::integer<256ul, int> > > >(DB::TypePair<DB::DataTypeNumber<double>, DB::DataTypeNumber<wide::integer<256ul, int> > > const&) const (this=0x7ffef70ea108, types=...) at /home/akuzm/ch2/ch/src/Functions/FunctionsConversion.h:1246
#129781 0x00007fffea0e8b32 in DB::callOnIndexAndDataType<DB::DataTypeNumber<wide::integer<256ul, int> >, DB::FunctionConvert<DB::DataTypeNumber<wide::integer<256ul, int> >, DB::NameToInt256, DB::ToNumberMonotonicity<wide::integer<256ul, int> > >::executeInternal(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const::{lambda(auto:1 const&)#1}&>(DB::TypeIndex, DB::FunctionConvert<DB::DataTypeNumber<wide::integer<256ul, int> >, DB::NameToInt256, DB::ToNumberMonotonicity<wide::integer<256ul, int> > >::executeInternal(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const::{lambda(auto:1 const&)#1}&) (number=DB::TypeIndex::Float64, f=...) at /home/akuzm/ch2/ch/src/Core/callOnTypeIndex.h:184
#129782 0x00007fffea0e84de in DB::FunctionConvert<DB::DataTypeNumber<wide::integer<256ul, int> >, DB::NameToInt256, DB::ToNumberMonotonicity<wide::integer<256ul, int> > >::executeInternal (this=0x7fff1238f918, arguments=..., result_type=..., input_rows_count=1) at /home/akuzm/ch2/ch/src/Functions/FunctionsConversion.h:1270
#129783 0x00007fffea0e75ce in DB::FunctionConvert<DB::DataTypeNumber<wide::integer<256ul, int> >, DB::NameToInt256, DB::ToNumberMonotonicity<wide::integer<256ul, int> > >::executeImpl (this=0x7fff1238f918, arguments=..., result_type=..., input_rows_count=1) at /home/akuzm/ch2/ch/src/Functions/FunctionsConversion.h:1148
#129784 0x00007fffe9eed5f8 in DB::IFunction::executeImplDryRun (this=0x7fff1238f918, arguments=..., result_type=..., input_rows_count=1) at /home/akuzm/ch2/ch/src/Functions/IFunctionImpl.h:203
#129785 0x00007fffe9eecaee in DB::DefaultExecutable::executeDryRun (this=0x7fff1238fac0, arguments=..., result_type=..., input_rows_count=1) at /home/akuzm/ch2/ch/src/Functions/IFunctionAdaptors.h:156
#129786 0x00007fffeaa8c243 in DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns (this=0x7ffefa12ac58, args=..., result_type=..., input_rows_count=1, dry_run=true) at /home/akuzm/ch2/ch/src/Functions/IFunction.cpp:290
#129787 0x00007fffeaa8be4e in DB::ExecutableFunctionAdaptor::defaultImplementationForConstantArguments (this=0x7ffefa12ac58, args=..., result_type=..., input_rows_count=1, dry_run=true) at /home/akuzm/ch2/ch/src/Functions/IFunction.cpp:240
#129788 0x00007fffeaa8c10b in DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns (this=0x7ffefa12ac58, args=..., result_type=..., input_rows_count=1, dry_run=true) at /home/akuzm/ch2/ch/src/Functions/IFunction.cpp:282
#129789 0x00007fffeaa8d245 in DB::ExecutableFunctionAdaptor::execute (this=0x7ffefa12ac58, arguments=..., result_type=..., input_rows_count=1, dry_run=true) at /home/akuzm/ch2/ch/src/Functions/IFunction.cpp:447
#129790 0x00007fffe1f95b5e in DB::ActionsDAG::addFunction (this=0x7fffd2291458, function=..., argument_names=..., result_name=..., context=...) at /home/akuzm/ch2/ch/src/Interpreters/ActionsDAG.cpp:185
#129791 0x00007fffe1fc8343 in DB::ScopeStack::addFunction (this=0x7ffef70ecc70, function=..., argument_names=..., result_name=...) at /home/akuzm/ch2/ch/src/Interpreters/ActionsVisitor.cpp:501
#129792 0x00007fffe1fd0ca0 in DB::ActionsMatcher::Data::addFunction (this=0x7ffef70ecc20, function=..., argument_names=..., result_name=...) at /home/akuzm/ch2/ch/src/Interpreters/ActionsVisitor.h:155
#129793 0x00007fffe1fcb43c in DB::ActionsMatcher::visit (node=..., ast=..., data=...) at /home/akuzm/ch2/ch/src/Interpreters/ActionsVisitor.cpp:938
#129794 0x00007fffe1fc86a7 in DB::ActionsMatcher::visit (ast=..., data=...) at /home/akuzm/ch2/ch/src/Interpreters/ActionsVisitor.cpp:546
#129795 0x00007fffe1fca77c in DB::ActionsMatcher::visit (node=..., ast=..., data=...) at /home/akuzm/ch2/ch/src/Interpreters/ActionsVisitor.cpp:850
#129796 0x00007fffe1fc86a7 in DB::ActionsMatcher::visit (ast=..., data=...) at /home/akuzm/ch2/ch/src/Interpreters/ActionsVisitor.cpp:546
#129797 0x00007fffe1fcbd66 in DB::ActionsMatcher::visit (expression_list=..., data=...) at /home/akuzm/ch2/ch/src/Interpreters/ActionsVisitor.cpp:654
#129798 0x00007fffe1fc8713 in DB::ActionsMatcher::visit (ast=..., data=...) at /home/akuzm/ch2/ch/src/Interpreters/ActionsVisitor.cpp:550
#129799 0x00007fffe241e26b in DB::InDepthNodeVisitor<DB::ActionsMatcher, true, std::__1::shared_ptr<DB::IAST> const>::visit (this=0x7ffef70ecbc8, ast=...) at /home/akuzm/ch2/ch/src/Interpreters/InDepthNodeVisitor.h:34
#129800 0x00007fffe24141e6 in DB::ExpressionAnalyzer::getRootActions (this=0x7fff123771c0, ast=..., no_subqueries=false, actions=..., only_consts=false) at /home/akuzm/ch2/ch/src/Interpreters/ExpressionAnalyzer.cpp:400
#129801 0x00007fffe2417dae in DB::SelectQueryExpressionAnalyzer::appendSelect (this=0x7fff123771c0, chain=..., only_types=false) at /home/akuzm/ch2/ch/src/Interpreters/ExpressionAnalyzer.cpp:853
#129802 0x00007fffe241af48 in DB::ExpressionAnalysisResult::ExpressionAnalysisResult (this=0x7ffef70edb38, query_analyzer=..., metadata_snapshot=..., first_stage_=true, second_stage_=true, only_types=false, filter_info_=..., source_header=...) at /home/akuzm/ch2/ch/src/Interpreters/ExpressionAnalyzer.cpp:1225
#129803 0x00007fffe289e495 in DB::InterpreterSelectQuery::getSampleBlockImpl (this=0x7fff1cdb1e00) at /home/akuzm/ch2/ch/src/Interpreters/InterpreterSelectQuery.cpp:515
#129804 0x00007fffe289b2fa in DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&)::$_2::operator()(bool) const (this=0x7ffef70eece8, try_move_to_prewhere=true) at /home/akuzm/ch2/ch/src/Interpreters/InterpreterSelectQuery.cpp:407
#129805 0x00007fffe2897fa4 in DB::InterpreterSelectQuery::InterpreterSelectQuery (this=0x7fff1cdb1e00, query_ptr_=..., context_=..., input_=..., input_pipe_=..., storage_=..., options_=..., required_result_column_names=..., metadata_snapshot_=...) at /home/akuzm/ch2/ch/src/Interpreters/InterpreterSelectQuery.cpp:410
#129806 0x00007fffe2896ddc in DB::InterpreterSelectQuery::InterpreterSelectQuery (this=0x7fff1cdb1e00, query_ptr_=..., context_=..., options_=..., required_result_column_names_=...) at /home/akuzm/ch2/ch/src/Interpreters/InterpreterSelectQuery.cpp:149
#129807 0x00007fffe291a061 in std::__1::make_unique<DB::InterpreterSelectQuery, std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&> (__args=..., __args=..., __args=..., __args=...) at /home/akuzm/ch2/ch/contrib/libcxx/include/memory:3028
#129808 0x00007fffe2918afa in DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery (this=0x7fffd2316400, query_ptr_=..., context_=..., options_=..., required_result_column_names=...) at /home/akuzm/ch2/ch/src/Interpreters/InterpreterSelectWithUnionQuery.cpp:84
#129809 0x00007fffe28437d5 in std::__1::make_unique<DB::InterpreterSelectWithUnionQuery, std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions> (__args=..., __args=..., __args=...) at /home/akuzm/ch2/ch/contrib/libcxx/include/memory:3028
#129810 0x00007fffe2842277 in DB::InterpreterFactory::get (query=..., context=..., stage=DB::QueryProcessingStage::Complete) at /home/akuzm/ch2/ch/src/Interpreters/InterpreterFactory.cpp:110
#129811 0x00007fffe2d72567 in DB::executeQueryImpl (begin=0x7fffd2312260 "SELECT toInt128(NULL) + toUInt16(NULL) AS x, toInt256(inf) + toUInt16(2) AS y, toTypeName(x)", end=0x7fffd23122bc "", context=..., internal=false, stage=DB::QueryProcessingStage::Complete, has_query_tail=false, istr=0x0) at /home/akuzm/ch2/ch/src/Interpreters/executeQuery.cpp:459
#129812 0x00007fffe2d7139a in DB::executeQuery (query=..., context=..., internal=false, stage=DB::QueryProcessingStage::Complete, may_have_embedded_data=true) at /home/akuzm/ch2/ch/src/Interpreters/executeQuery.cpp:813
#129813 0x00007fffde98292f in DB::TCPHandler::runImpl (this=0x7ffefa122000) at /home/akuzm/ch2/ch/src/Server/TCPHandler.cpp:255
#129814 0x00007fffde98bdc8 in DB::TCPHandler::run (this=0x7ffefa122000) at /home/akuzm/ch2/ch/src/Server/TCPHandler.cpp:1337
#129815 0x00007ffff49bad8c in Poco::Net::TCPServerConnection::start (this=0x7ffefa122000) at /home/akuzm/ch2/ch/contrib/poco/Net/src/TCPServerConnection.cpp:43
#129816 0x00007ffff49bb59a in Poco::Net::TCPServerDispatcher::run (this=0x7fff1248c300) at /home/akuzm/ch2/ch/contrib/poco/Net/src/TCPServerDispatcher.cpp:114
#129817 0x00007ffff44cc173 in Poco::PooledThread::run (this=0x7fff1e2b5a00) at /home/akuzm/ch2/ch/contrib/poco/Foundation/src/ThreadPool.cpp:199
#129818 0x00007ffff44c903d in Poco::(anonymous namespace)::RunnableHolder::run (this=0x7fffd1a68a50) at /home/akuzm/ch2/ch/contrib/poco/Foundation/src/Thread.cpp:55
#129819 0x00007ffff44c7eba in Poco::ThreadImpl::runnableEntry (pThread=0x7fff1e2b5a38) at /home/akuzm/ch2/ch/contrib/poco/Foundation/src/Thread_POSIX.cpp:345
#129820 0x00007ffff362e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#129821 0x00007ffff38c4293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
```
{
    if constexpr (std::is_floating_point_v<typename DataType::FieldType>)
        return tryReadFloatText(x, rb);
    else 
        return tryReadIntText(x, rb);
}
template <>
inline bool tryParseImpl<DataTypeDate>(DataTypeDate::FieldType & x, ReadBuffer & rb, const DateLUTImpl *)
{
    DayNum tmp(0);
    if (!tryReadDateText(tmp, rb))
        return false;
    x = tmp;
    return true;
}
template <>
inline bool tryParseImpl<DataTypeDateTime>(DataTypeDateTime::FieldType & x, ReadBuffer & rb, const DateLUTImpl * time_zone)
{
    time_t tmp = 0;
    if (!tryReadDateTimeText(tmp, rb, *time_zone))
        return false;
    x = tmp;
    return true;
}
template <>
inline bool tryParseImpl<DataTypeUUID>(DataTypeUUID::FieldType & x, ReadBuffer & rb, const DateLUTImpl *)