Yes, for UPSERT VALUES, is check already that ensures the top level node is a constant. However, there are more cases of being a constant than just a ParseNode that is a LiteralParseNode. The code I pointed you to does all the necessary checks. Best is to re-use that code for this as well.