Rewrite or Not Rewrite? ML-Based Algorithm Selection for Datalog Query Answering on Knowledge Graphs (Frontiers in artificial intelligence and applications)