I'd also recommend "How Query Engines Work" for a good practical exercise in the topic: https://andygrove.io/how-query-engines-work/ . I think one should go already have a high-level overview of what individual parts make up a query engine and what there purpose is, as it only touches on that lightly.
I own the book and would agree -- only reason I didn't suggest this is that the areas on query-planning and optimization are a bit thin.
IMO it's great if you want a holistic view of building a query engine start-to-finish with just enough detail to build a basic implementation.
I probably learned more from the ~100 pages in this book than I did from most other sources.
"Building Query Compilers"
https://pi3.informatik.uni-mannheim.de/~moer/querycompiler.p...
EDIT: You also might get use out of TUM's course "Database Systems on Modern CPU Architectures"
The year that contains all the video lectures is 2020:
https://db.in.tum.de/teaching/ss20/moderndbs/?lang=en