zettadb / kunlun

KunlunBase is a distributed relational database management system(RDBMS) with complete NewSQL capabilities and robust transaction ACID guarantees and is compatible with standard SQL. Applications which used PostgreSQL or MySQL can work with KunlunBase as-is without any code change or rebuild because KunlunBase supports both PostgreSQL and MySQL connection protocols and DML SQL grammars. MySQL DBAs can quickly work on a KunlunBase cluster because we use MySQL as storage nodes of KunlunBase. KunlunBase can elastically scale out as needed, and guarantees transaction ACID under error conditions, and KunlunBase fully passes TPC-C, TPC-H and TPC-DS test suites, so it not only support OLTP workloads but also OLAP workloads. Application developers can use KunlunBase to build IT systems that handles terabytes of data, without any effort on their part to implement data sharding, distributed transaction processing, distributed query processing, crash safety, high availability, strong consistency, horizontal scalability. All these powerful features are provided by KunlunBase. KunlunBase supports powerful and user friendly cluster management, monitor and provision features, can be readily used as DBaaS.
http://www.kunlunbase.com
Apache License 2.0
143 stars 19 forks source link

BUG FOR ERROR: Kunlun-db: The generated scan expression cannot be pushed down #711

Open jd-zhang opened 2 years ago

jd-zhang commented 2 years ago

Issue migrated from trac ticket # 617

component: computing nodes | priority: critical

2022-04-26 11:53:21: hegexin created the issue


table ddl : CREATE TABLE "erp_order" ( "id" int4 NOT NULL, "belong_store_id" int4 NOT NULL, "table_id" int4 NOT NULL,
"person_number" int4, "pos_id" int4, "source" int4, "waiter_id" int4, "op_id" int4, "net_pay_price" numeric(20,2) NOT NULL, "pay_method_id" int4, "order_seq" varchar(50), "pay_seq" varchar(100), "member_id" int4,
"coupon_seq" varchar(400), "has_packet" int4, "has_promotion" int4, "has_add_menu" int4, "has_return" int4, "memo" varchar(500), "status" int4 NOT NULL,
"crt_date" timestamp(0),
"update_date" timestamp(0), "upload_time" timestamp(0), "remove_remnant_price" numeric(20,2), "free_price" numeric(20,2), "coupon_cash_reduce_price" numeric(20,2), "account_price" numeric(20,2), "promotion_price" numeric(20,2), "group_purchase_discount_price" numeric(20,2), "member_discount_price" numeric(20,2), "packet_discount_price" numeric(20,2), "coupon_exchange_price" numeric(20,2), "coupon_discount_price" numeric(20,2), "group_coupon_seq" varchar(400), "wcpa_id" int4, "refund_reason" varchar(200), "refund_status" int4, "pay_cash" numeric(20,2), "refund_price" numeric(20,2), "pay_alipay" numeric(20,2), "pay_wechat" numeric(20,2), "refund_wechat_price" numeric(20,2), "refund_balance_price" numeric(20,2), "refund_cash_price" numeric(20,2), "pay_balance" numeric(20,2), "refund_alipay_price" numeric(20,2), "refund_time" timestamp(0), "refund_finish_time" timestamp(0), "refund_coupon_seq" varchar(400), "pay_book" numeric(20,2), "book_seq" varchar(50), "isv_pay" int4, "pay_sys_time" timestamp(0), "refund_sys_time" timestamp(0), "refund_coupon_amount" numeric(20,2), "sync_flag" int4, "alipa_id" int4,
"refund_op_employee_id" varchar(20), "employee_id" varchar(15), "group_purchase_channel" int2, "act_discount_price" numeric(10,2) DEFAULT NULL::numeric, "gift_card_seq" varchar(100), "gift_card_price" numeric(10,2), "free_gift_card_price" numeric(10,2), "refund_gift_card_price" numeric(10,2), "refund_free_gift_card_price" numeric(10,2), "nn_status" int4
) partition by hash(id);

DML : select 'D' as type, to_date('2022-04-18', 'YYYY-MM-DD') as biz_date, sum(erp_order.net_pay_price) as net_pay, min(erp_order.crt_date) as first_in_time, max(erp_order.crt_date) as last_in_time, to_char(((to_timestamp('2018-01-01 ' || min(to_char((erp_order.crt_date + '-6 hour'), 'hh24:mi:ss')), 'yyyy-mm-dd hh24:mi:ss') + '6 hour')), 'hh24:mi:ss') as earliest_time, to_char(((to_timestamp('2018-01-01 ' || max(to_char((erp_order.crt_date + '-6 hour'), 'hh24:mi:ss')), 'yyyy-mm-dd hh24:mi:ss') + '6 hour')), 'hh24:mi:ss') as latest_time, erp_order.member_id as member_id, CURRENT_TIMESTAMP as create_date, CURRENT_TIMESTAMP as update_date FROM erp_order WHERE erp_order.member_id>0 and erp_order.status=2 group by erp_order.member_id;

jd-zhang commented 2 years ago

2022-06-06 12:13:58: zhaowei@zettadb.com

jd-zhang commented 2 years ago

2022-06-06 12:13:58: zhaowei@zettadb.com changed owner from david to smith

jd-zhang commented 2 years ago

2022-06-06 12:13:58: zhaowei@zettadb.com changed status from new to assigned

jd-zhang commented 2 years ago

2022-06-08 18:17:09: smith changed status from assigned to accepted