Skip to content

There is no supertype for types MyDateTime(0) #7385

@aytrack

Description

@aytrack

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

 CREATE TABLE `NT_28377` (
  `COL102` float DEFAULT NULL,
  `COL103` float DEFAULT NULL,
  `COL1` float GENERATED ALWAYS AS ((`COL102` * `COL103`)) VIRTUAL,
  `COL2` varchar(20) DEFAULT NULL,
  `COL4` datetime DEFAULT NULL,
  `COL3` bigint(20) DEFAULT NULL,
  `COL5` float DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
alter table NT_28377 set tiflash replica 1;
select * from NT_28377 where  col2 in ("eC", "rbsowIO0qt");

2. What did you expect to see? (Required)

query success

3. What did you see instead (Required)

TiDB root@127.0.0.1:new_data> select * from NT_28377 where  col2 in ("eC", "rbsowIO0qt");
(1105, 'There is no supertype for types MyDateTime(0), String, String because some of them are String/FixedString and some of them are not: (while creating InputStreams from storage `db_102`.`t_104`, table_id: 104)')

the log

[2023/04/26 11:09:07.437 +08:00] [ERROR] [DAGDriver.cpp:209] ["DB Exception: There is no supertype for types MyDateTime(0), String, String because some of them are String/FixedString and some of them are not: (while creating InputStreams from storage `db_102`.`t_104`, table_id: 104)

       0x1bfea3e	DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) [tiflash+29354558]
                	dbms/src/Common/Exception.h:46
       0x76bc62d	DB::getLeastSupertype(std::__1::vector<std::__1::shared_ptr<DB::IDataType const>, std::__1::allocator<std::__1::shared_ptr<DB::IDataType const> > > const&) [tiflash+124503597]
                	dbms/src/DataTypes/getLeastSupertype.cpp:219
       0x76bb83e	DB::getLeastSupertype(std::__1::vector<std::__1::shared_ptr<DB::IDataType const>, std::__1::allocator<std::__1::shared_ptr<DB::IDataType const> > > const&) [tiflash+124500030]
                	dbms/src/DataTypes/getLeastSupertype.cpp:199
       0x81453da	DB::DAGExpressionAnalyzerHelper::buildInFunction(DB::DAGExpressionAnalyzer*, tipb::Expr const&, std::__1::shared_ptr<DB::ExpressionActions> const&) [tiflash+135549914]
                	dbms/src/Flash/Coprocessor/DAGExpressionAnalyzerHelper.cpp:153
       0x811e60f	DB::DAGExpressionAnalyzer::getActions(tipb::Expr const&, std::__1::shared_ptr<DB::ExpressionActions> const&, bool) [tiflash+135390735]
                	dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp:1521
       0x812984c	DB::DAGExpressionAnalyzer::buildFilterColumn(std::__1::shared_ptr<DB::ExpressionActions> const&, google::protobuf::RepeatedPtrField<tipb::Expr> const&) [tiflash+135436364]
                	dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp:687
       0x812a8e1	DB::DAGExpressionAnalyzer::appendWhere(DB::ExpressionActionsChain&, google::protobuf::RepeatedPtrField<tipb::Expr> const&) [tiflash+135440609]
                	dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp:717
       0x81e97eb	DB::buildPushDownFilter(google::protobuf::RepeatedPtrField<tipb::Expr> const&, DB::DAGExpressionAnalyzer&) [tiflash+136222699]
                	dbms/src/Flash/Coprocessor/InterpreterUtils.cpp:250
       0x7e43617	DB::StorageDeltaMerge::buildPushDownFilter(std::__1::shared_ptr<DB::DM::RSOperator> const&, std::__1::vector<TiDB::ColumnInfo, std::__1::allocator<TiDB::ColumnInfo> > const&, google::protobuf::RepeatedPtrField<tipb::Expr> const&, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine> > const&, DB::Context const&, std::__1::shared_ptr<DB::Logger> const&) [tiflash+132396567]
                	dbms/src/Storages/StorageDeltaMerge.cpp:820
       0x7e44ae8	DB::StorageDeltaMerge::parsePushDownFilter(DB::SelectQueryInfo const&, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine> > const&, DB::Context const&, std::__1::shared_ptr<DB::Logger> const&) [tiflash+132401896]
                	dbms/src/Storages/StorageDeltaMerge.cpp:840
       0x7e44e7f	DB::StorageDeltaMerge::read(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&, DB::SelectQueryInfo const&, DB::Context const&, DB::QueryProcessingStage::Enum&, unsigned long, unsigned int) [tiflash+132402815]
                	dbms/src/Storages/StorageDeltaMerge.cpp:881
       0x818e4f2	DB::DAGStorageInterpreter::buildLocalStreams(DB::DAGPipeline&, unsigned long) [tiflash+135849202]
                	dbms/src/Flash/Coprocessor/DAGStorageInterpreter.cpp:789
       0x818941b	DB::DAGStorageInterpreter::executeImpl(DB::DAGPipeline&) [tiflash+135828507]
                	dbms/src/Flash/Coprocessor/DAGStorageInterpreter.cpp:287
       0x831df8a	DB::PhysicalTableScan::buildBlockInputStreamImpl(DB::DAGPipeline&, DB::Context&, unsigned long) [tiflash+137486218]
                	dbms/src/Flash/Planner/Plans/PhysicalTableScan.cpp:68
       0x82c2146	DB::PhysicalPlanNode::buildBlockInputStream(DB::DAGPipeline&, DB::Context&, unsigned long) [tiflash+137109830]
                	dbms/src/Flash/Planner/PhysicalPlanNode.cpp:83
       0x831ad36	DB::PhysicalProjection::buildBlockInputStreamImpl(DB::DAGPipeline&, DB::Context&, unsigned long) [tiflash+137473334]
                	dbms/src/Flash/Planner/Plans/PhysicalProjection.cpp:143
       0x82c2146	DB::PhysicalPlanNode::buildBlockInputStream(DB::DAGPipeline&, DB::Context&, unsigned long) [tiflash+137109830]
                	dbms/src/Flash/Planner/PhysicalPlanNode.cpp:83
       0x82c9bde	DB::Planner::execute() [tiflash+137141214]
                	dbms/src/Flash/Planner/Planner.cpp:36
       0x811b889	DB::(anonymous namespace)::doExecuteAsBlockIO(DB::IQuerySource&, DB::Context&, bool) [tiflash+135379081]
                	dbms/src/Flash/executeQuery.cpp:95
       0x811aa3f	DB::queryExecute(DB::Context&, bool) [tiflash+135375423]
                	dbms/src/Flash/executeQuery.cpp:177
       0x8115c8e	DB::DAGDriver<false>::execute() [tiflash+135355534]
                	dbms/src/Flash/Coprocessor/DAGDriver.cpp:94
       0x80bfe68	DB::CoprocessorHandler::execute() [tiflash+135003752]
                	dbms/src/Flash/CoprocessorHandler.cpp:122
       0x80e4fa3	std::__1::__function::__func<DB::FlashService::Coprocessor(grpc::ServerContext*, coprocessor::Request const*, coprocessor::Response*)::$_6, std::__1::allocator<DB::FlashService::Coprocessor(grpc::ServerContext*, coprocessor::Request const*, coprocessor::Response*)::$_6>, grpc::Status ()>::operator()() [tiflash+135155619]
                	/usr/local/bin/../include/c++/v1/__functional/function.h:345
       0x80e3bb8	std::__1::__packaged_task_func<std::__1::function<grpc::Status ()>, std::__1::allocator<std::__1::function<grpc::Status ()> >, grpc::Status ()>::operator()() [tiflash+135150520]
                	/usr/local/bin/../include/c++/v1/future:1687
       0x80e3d75	std::__1::packaged_task<grpc::Status ()>::operator()() [tiflash+135150965]
                	/usr/local/bin/../include/c++/v1/future:1960
       0x865cf94	void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, legacy::ThreadPool::ThreadPool(unsigned long, std::__1::function<void ()>)::$_0> >(void*) [tiflash+140890004]
                	/usr/local/bin/../include/c++/v1/thread:291
  0x7f1db6161802	start_thread [libc.so.6+653314]
  0x7f1db6101450	clone3 [libc.so.6+259152]"] [source=DAGDriver] [thread_id=88]

4. What is your TiFlash version? (Required)

TiFlash
Release Version: v7.1.0-rc.0
Edition:         Community
Git Commit Hash: 4ee141267ff83314ae85313860b1bd007c29b658
Git Branch:      heads/refs/tags/v7.1.0-rc.0
UTC Build Time:  2023-04-21 10:16:18
Enable Features: jemalloc sm4(GmSSL) avx2 avx512 unwind thinlto
Profile:         RELWITHDEBINFO

Raft Proxy
Git Commit Hash:   23dea9183f921908963801854324029d066c0be9
Git Commit Branch: HEAD
UTC Build Time:    2023-04-21 10:22:36
Rust Version:      rustc 1.67.0-nightly (96ddd32c4 2022-11-14)
Storage Engine:    tiflash
Prometheus Prefix: tiflash_proxy_
Profile:           release
Enable Features:   Unknown (env var does not exist when building)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions