Yes, limit with literal numbers in both outer and inner queries can be handled. Please see "testDerivedTableWithLimit()".
Yes, agree. It would just require the compiler to handle derived tables. Right now we only support cases that can be handled by "pre-processing", i.e., rewriting; and let QueryCompiler to throw a SQLFeatureNotSupportedException if the from node is a derived table.