[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-496376-105":59,"doc-detail-496376-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","parseval-plan-aware-test-database-generation-for-sql-equivalence-evaluation","ParSEval - Plan-aware Test Database Generation for SQL Equivalence Evaluation","","Deciding semantic equivalence of SQL queries underpins tasks such as evaluating text-to-SQL systems by comparing model-generated queries with ground truth. Because equivalence is undecidable in general, prior work follows either verification-based methods or test-case-based methods. Verification can miss advanced SQL features and cross-database adaptability, while test cases rely on ad-hoc constraints and risk false positives. ParSEval generates plan-aware test databases by modeling operator behaviors and exploring execution paths via branch coverage. Experiments on four datasets show up to 40% more disproved query pairs and 21× faster detection.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/parseval-plan-aware-test-database-generation-for-sql-equivalence-evaluation/496376/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/parseval-plan-aware-test-database-generation-for-sql-equivalence-evaluation/496376.png","ImageObject",300,407,{"name":92,"@type":93},"Hazel","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-26","2026-10-02",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What problem does ParSEval address in SQL equivalence evaluation?","Question",{"text":113,"@type":114},"ParSEval targets the challenge of evaluating semantic equivalence between two SQL queries, especially for assessing text-to-SQL accuracy when equivalence can be undecidable and existing methods may miss nonequivalent pairs.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How does ParSEval generate test database instances?",{"text":118,"@type":114},"ParSEval models specific behaviors of each SQL query operator and generates test databases that consider all execution paths of the logical query plan, using a branch-coverage inspired notion.",{"name":120,"@type":111,"acceptedAnswer":121},"What do the experimental results show compared with prior approaches?",{"text":122,"@type":114},"Compared with verification-based solutions, ParSEval supports up to 40% more query pairs. Compared with test-case-based approaches, it finds more nonequivalent pairs and runs about 21× faster.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},496376,1791168652,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":19,"preview_urls":147},137441390410,"https://ap-avatar.wpscdn.com/avatar/2000252f4ab5702993?_k=1776741390130283984","ParSEval: Plan-aware Test Database Generation for SQL  \nEquivalence Evaluation  \nChunyu Chen  \nSimon Fraser University [chunyu_chen@sfu.ca](chunyu_chen@sfu.ca)  \nZhengjie Miao∗ Simon Fraser University [zhengjie@sfu.ca](zhengjie@sfu.ca)  \nYong Zhang  \nHuawei Technologies [yong.zhang3@huawei.com](yong.zhang3@huawei.com)  \nJiannan Wang  \nHuawei Technologies Simon Fraser University [jnwang@sfu.ca](jnwang@sfu.ca)  \nABSTRACT  \nDeciding query equivalence has played an essential role in many real-world applications, including evaluating the accuracy of textto-SQL models, where one needs to compare model-generated queries against ground truth queries. Although query equivalence is undecidable in general, researchers have developed two significant approaches to check query equivalence: formal verification-based and test-case-based. Verification-based solutions ensure correctness but may lack support for advanced SQL features and cross-database adaptability. Test cases are versatile but suffer from ad-hoc constraints and potential incorrectness (false positives) .  \nIn this paper, we propose ParSEval, a Plan-aware SQL Equivalence evaluation framework to generate test database instances for given queries. We observed that existing test data generation methods fail to fully explore the query structure. To address this limitation, ParSEval formally models specific behaviors of each query operator and considers all possible execution paths ofthe logical query plan by adapting the notion of branch coverage. We validated the effectiveness and efficiency of ParSEval on four datasets with AI-generated and human-crafted queries. The experimental results show that ParSEval supports up to 40% more query pairs than state-of-the-art verification-based approaches. Compared to existing test-case-based approaches, ParSEval reveals more nonequivalent pairs while being 21× faster.  \nPVLDB Reference Format:  \nChunyu Chen, Zhengjie Miao, Yong Zhang, and Jiannan Wang. ParSEval: Plan-aware Test Database Generation for SQL Equivalence Evaluation. PVLDB, 18(11): 4750-4762, 2025 .  \ndoi:10.14778/3749646.3749727  \nPVLDB Artifact Availability:  \nThe source code, data, and/or other artifacts have been made available at [https://github.com/sfu-db/ParSEval](https://github.com/sfu-db/ParSEval).  \n1 INTRODUCTION  \nDetermining the semantic equivalence of two SQL queries has long been an important task in the database community, with significant implications for query optimization [10, 36], query rewriting [43], and SQL assignment grading [12, 31] . Recently, this task has gained  \n∗ Corresponding author.  \nThis work is licensed under the Creative Commons BY-NC-ND 4.0 International License. Visit [https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of](https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of)[ ](https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of)[this license. For any use beyond those covered by this license](this license. For any use beyond those covered by this license), [obtain permission by](obtain permission by)[emailing info@vldb.org. Copyright](emailing info@vldb.org. Copyright) is held by the owner/author(s). Publication rights licensed to the VLDB Endowment.  \nProceedings of the VLDB Endowment, Vol. 18, No. 11 ISSN 2150-8097 . doi:10.14778/3749646.3749727  \nFigure 1: Performance of equivalence evaluation methods on 1534 pairs of queries from a text-to-SQL model for the BIRD benchmark [25]. \\# of disproved pairs is the number of pairs each method finds inequivalent.  \nincreasing attention with the rise of text-to-SQL translation [5, 9, 32, 38, 40], where it plays a key role in evaluating the accuracy of text-to-SQL models. This scenario typically involves a set of natural language questions tied to a database schema and their corresponding ground truth SQL queries. The evaluation process then checks whether model-generated SQL queries are semantically equivalent to the ground truth queries.  \nThe standa","cbCaiesCq1RigyTi","https://ap.wps.com/l/cbCaiesCq1RigyTi","pdf",1564204,13,"English","# Introduction\n# Background and Motivation\n# ParSEval Framework\n## Plan-aware Test Database Generation\n## Branch Coverage over Logical Query Plans\n# Experiments and Results\n## Datasets and Query Settings\n## Effectiveness and Efficiency Comparison\n# Conclusion","[{\"question\":\"What problem does ParSEval address in SQL equivalence evaluation?\",\"answer\":\"ParSEval targets the challenge of evaluating semantic equivalence between two SQL queries, especially for assessing text-to-SQL accuracy when equivalence can be undecidable and existing methods may miss nonequivalent pairs.\"},{\"question\":\"How does ParSEval generate test database instances?\",\"answer\":\"ParSEval models specific behaviors of each SQL query operator and generates test databases that consider all execution paths of the logical query plan, using a branch-coverage inspired notion.\"},{\"question\":\"What do the experimental results show compared with prior approaches?\",\"answer\":\"Compared with verification-based solutions, ParSEval supports up to 40% more query pairs. Compared with test-case-based approaches, it finds more nonequivalent pairs and runs about 21× faster.\"}]","ParSEval - Plan-aware Test Database Generation for SQL Equivalence Evaluation | PDF",1790931347,33,[148,152,156,160],{"page_no":8,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/5e341d7b9a75de63ade8182afd6d2dda.webp",983,1272,{"page_no":14,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ed8dbbabd0765dfc0a7d40a12fc66d51.webp",982,1270,{"page_no":81,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/465337beab5e1bfb8f6b7595a8cab0bc.webp",981,1269,{"page_no":19,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/2679fa721e51d3d65feabef4f8622234.webp",980,1268]