```SELECT intDiv(toInt64(number), -1)
FROM numbers(9223372036854775807, 10)

[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:47.551836 [ 201 ] <Fatal> BaseDaemon: ########################################
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:47.551968 [ 201 ] <Fatal> BaseDaemon: (version 21.4.1.6255, build id: 8D1F20E7F44153987ED2C79CE19BC63728D9C52A) (from thread 199) (query_id: b2e69136-8d5d-48a0-8c33-09141c4bd472) Received signal Unknown signal (-3)
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:47.552014 [ 201 ] <Fatal> BaseDaemon: Sanitizer trap.
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:47.552093 [ 201 ] <Fatal> BaseDaemon: Stack trace: 0xe8d7bf5 0xeb05896 0xe89bed6 0xe8a857f 0x13ae3525 0x13b9c428 0x13b9bcaf 0x13ae265c 0x13ad816a 0x13af6816 0x13af5a3c 0x1251cf77 0x12fc35cc 0x12fc44ee 0x1a1ce214 0x1a1cd730 0x1b80d21e 0x1b56f042 0x1b56e550 0x1b59ef09 0x1b59edf7 0x1b59d804 0x1b59c0ba 0x1b59bb7b 0x1b5ae2e6 0x1b5ae237 0x1b5ae0f2 0xe90a46f 0xe90e146 0x7f219bc53609 0x7f219bb7a293
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:47.569694 [ 201 ] <Fatal> BaseDaemon: 0.1. inlined from ./obj-x86_64-linux-gnu/../src/Common/StackTrace.cpp:298: StackTrace::tryCapture()
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:47.569734 [ 201 ] <Fatal> BaseDaemon: 0. ../src/Common/StackTrace.cpp:259: StackTrace::StackTrace() @ 0xe8d7bf5 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:47.625369 [ 201 ] <Fatal> BaseDaemon: 1. ./obj-x86_64-linux-gnu/../base/daemon/BaseDaemon.cpp:381: sanitizerDeathCallback() @ 0xeb05896 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:48.464137 [ 201 ] <Fatal> BaseDaemon: 2. __sanitizer::Die() @ 0xe89bed6 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:49.288204 [ 201 ] <Fatal> BaseDaemon: 3. ? @ 0xe8a857f in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:50.111186 [ 201 ] <Fatal> BaseDaemon: 4. DB::(anonymous namespace)::DivideIntegralByConstantImpl<long, signed char>::vectorConstant(long const*, signed char, long*, unsigned long) @ 0x13ae3525 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:50.935608 [ 201 ] <Fatal> BaseDaemon: 5. COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::FunctionBinaryArithmetic<DB::DivideIntegralImpl, DB::NameIntDiv, false, true>::executeNumeric<DB::DataTypeNumber<long>, DB::DataTypeNumber<signed char> >(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, DB::DataTypeNumber<long> const&, DB::DataTypeNumber<signed char> const&) const @ 0x13b9c428 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:51.774812 [ 201 ] <Fatal> BaseDaemon: 6. auto DB::FunctionBinaryArithmetic<DB::DivideIntegralImpl, DB::NameIntDiv, false, true>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const::'lambda'(auto const&, auto const&)::operator()<DB::DataTypeNumber<long>, DB::DataTypeNumber<signed char> >(auto const&, auto const&) const @ 0x13b9bcaf in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:52.602023 [ 201 ] <Fatal> BaseDaemon: 7. _ZN2DBL16castTypeToEitherIJNS_14DataTypeNumberIDuEENS1_ItEENS1_IjEENS1_ImEENS1_IN4wide7integerILm256EjEEEENS1_IaEENS1_IsEENS1_IiEENS1_IlEENS1_InEENS1_INS7_ILm256EiEEEENS1_IfEENS1_IdEENS_12DataTypeDateENS_16DataTypeDateTimeENS_15DataTypeDecimalINS_7DecimalIiEEEENSL_INSM_IlEEEENSL_INSM_InEEEENSL_INSM_ISF_EEEENS_19DataTypeFixedStringEENS_9IDataTypeEZZNS_24FunctionBinaryArithmeticINS_18DivideIntegralImplENS_10NameIntDivELb0ELb1EE13castBothTypesIZNKS10_11executeImplERKNSt3__16vectorINS_21ColumnWithTypeAndNameENS12_9allocatorIS14_EEEERKNS12_10shared_ptrIKSW_EEmEUlRKT_RKT0_E_EEbPS1B_S1M_OS1F_ENKUlS1H_E_clISD_EEDaS1H_EUlS1H_E_EEbPS1J_OT1_ @ 0x13ae265c in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:53.428373 [ 201 ] <Fatal> BaseDaemon: 8. _ZN2DBL16castTypeToEitherIJNS_14DataTypeNumberIDuEENS1_ItEENS1_IjEENS1_ImEENS1_IN4wide7integerILm256EjEEEENS1_IaEENS1_IsEENS1_IiEENS1_IlEENS1_InEENS1_INS7_ILm256EiEEEENS1_IfEENS1_IdEENS_12DataTypeDateENS_16DataTypeDateTimeENS_15DataTypeDecimalINS_7DecimalIiEEEENSL_INSM_IlEEEENSL_INSM_InEEEENSL_INSM_ISF_EEEENS_19DataTypeFixedStringEENS_9IDataTypeEZNS_24FunctionBinaryArithmeticINS_18DivideIntegralImplENS_10NameIntDivELb0ELb1EE13castBothTypesIZNKS10_11executeImplERKNSt3__16vectorINS_21ColumnWithTypeAndNameENS12_9allocatorIS14_EEEERKNS12_10shared_ptrIKSW_EEmEUlRKT_RKT0_E_EEbPS1B_S1M_OS1F_EUlS1H_E_EEbPS1J_OT1_ @ 0x13ad816a in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:54.251525 [ 201 ] <Fatal> BaseDaemon: 9. DB::FunctionBinaryArithmetic<DB::DivideIntegralImpl, DB::NameIntDiv, false, true>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x13af6816 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:55.073678 [ 201 ] <Fatal> BaseDaemon: 10. DB::FunctionBinaryArithmeticWithConstants<DB::DivideIntegralImpl, DB::NameIntDiv, false, true>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x13af5a3c in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:55.897856 [ 201 ] <Fatal> BaseDaemon: 11. DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x1251cf77 in /workspace/clickhouse
[linux-ubuntu-16-04-xenial] 2021.03.15 16:31:56.715041 [ 201 ] <Fatal> BaseDaemon: 12. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12fc35cc in /workspace/clickhouse
Error on processing query 'SELECT intDiv(toInt64(number), -1) FROM numbers(9223372036854775807, 10)': Code: 32, e.displayText() = DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000, Stack trace (when copying this message, always include the lines below):```
* Can be expanded to all possible combinations, but more code is needed.
  */
}
namespace impl_
{
template <> struct BinaryOperationImpl<UInt64, UInt8, DivideIntegralImpl<UInt64, UInt8>> : DivideIntegralByConstantImpl<UInt64, UInt8> {};
template <> struct BinaryOperationImpl<UInt64, UInt16, DivideIntegralImpl<UInt64, UInt16>> : DivideIntegralByConstantImpl<UInt64, UInt16> {};
template <> struct BinaryOperationImpl<UInt64, UInt32, DivideIntegralImpl<UInt64, UInt32>> : DivideIntegralByConstantImpl<UInt64, UInt32> {};
template <> struct BinaryOperationImpl<UInt64, UInt64, DivideIntegralImpl<UInt64, UInt64>> : DivideIntegralByConstantImpl<UInt64, UInt64> {};
template <> struct BinaryOperationImpl<UInt32, UInt8, DivideIntegralImpl<UInt32, UInt8>> : DivideIntegralByConstantImpl<UInt32, UInt8> {};
template <> struct BinaryOperationImpl<UInt32, UInt16, DivideIntegralImpl<UInt32, UInt16>> : DivideIntegralByConstantImpl<UInt32, UInt16> {};
template <> struct BinaryOperationImpl<UInt32, UInt32, DivideIntegralImpl<UInt32, UInt32>> : DivideIntegralByConstantImpl<UInt32, UInt32> {};
template <> struct BinaryOperationImpl<UInt32, UInt64, DivideIntegralImpl<UInt32, UInt64>> : DivideIntegralByConstantImpl<UInt32, UInt64> {};
template <> struct BinaryOperationImpl<Int64, Int8, DivideIntegralImpl<Int64, Int8>> : DivideIntegralByConstantImpl<Int64, Int8> {};
template <> struct BinaryOperationImpl<Int64, Int16, DivideIntegralImpl<Int64, Int16>> : DivideIntegralByConstantImpl<Int64, Int16> {};
template <> struct BinaryOperationImpl<Int64, Int32, DivideIntegralImpl<Int64, Int32>> : DivideIntegralByConstantImpl<Int64, Int32> {};
template <> struct BinaryOperationImpl<Int64, Int64, DivideIntegralImpl<Int64, Int64>> : DivideIntegralByConstantImpl<Int64, Int64> {};
template <> struct BinaryOperationImpl<Int32, Int8, DivideIntegralImpl<Int32, Int8>> : DivideIntegralByConstantImpl<Int32, Int8> {};
template <> struct BinaryOperationImpl<Int32, Int16, DivideIntegralImpl<Int32, Int16>> : DivideIntegralByConstantImpl<Int32, Int16> {};
template <> struct BinaryOperationImpl<Int32, Int32, DivideIntegralImpl<Int32, Int32>> : DivideIntegralByConstantImpl<Int32, Int32> {};
template <> struct BinaryOperationImpl<Int32, Int64, DivideIntegralImpl<Int32, Int64>> : DivideIntegralByConstantImpl<Int32, Int64> {};
}
struct NameIntDiv { static constexpr auto name = "intDiv"; };
using FunctionIntDiv = BinaryArithmeticOverloadResolver<DivideIntegralImpl, NameIntDiv, false>;
void registerFunctionIntDiv(FunctionFactory & factory)
{
    factory.registerFunction<FunctionIntDiv>();
}
}