```
SELECT * FROM t0 ASOF LEFT JOIN t1 ON (t1.x = t0.x) AND greater(('\0llall\0ll\0ll\0llall\0llall\0llall\0llall\0llall\0llall\0llall\0llall\0llall\0llall\0ll\0ll\0llall\0llall\0llall', x, x, y), t0.y, t1.y)
```

#include <Parsers/queryToString.h>
#include <Interpreters/CollectJoinOnKeysVisitor.h>
#include <Interpreters/IdentifierSemantic.h>
#include <Interpreters/TableJoin.h>
namespace DB
{
namespace ErrorCodes
{
    extern const int INVALID_JOIN_ON_EXPRESSION;
    extern const int AMBIGUOUS_COLUMN_NAME;
    extern const int LOGICAL_ERROR;
}
void CollectJoinOnKeysMatcher::Data::addJoinKeys(const ASTPtr & left_ast, const ASTPtr & right_ast,
                                                 const std::pair<size_t, size_t> & table_no)
{
    ASTPtr left = left_ast->clone();
    ASTPtr right = right_ast->clone();
    if (table_no.first == 1 || table_no.second == 2)
        analyzed_join.addOnKeys(left, right);
    else if (table_no.first == 2 || table_no.second == 1)
        analyzed_join.addOnKeys(right, left);
    else
        throw Exception("Cannot detect left and right JOIN keys. JOIN ON section is ambiguous.",
                        ErrorCodes::AMBIGUOUS_COLUMN_NAME);
    has_some = true;
}
void CollectJoinOnKeysMatcher::Data::addAsofJoinKeys(const ASTPtr & left_ast, const ASTPtr & right_ast,