def test_comparison_refs():

    def dummy_node(node_id) -> Node:
        n = Node(node_id, metadata=None, bindings=[], upstream_nodes=[], flyte_entity=SQLTask(name='x', query_template='x', inputs={}))
        n._id = node_id
        return n
    px = Promise('x', NodeOutput(var='x', node=dummy_node('n1')))
    py = Promise('y', NodeOutput(var='y', node=dummy_node('n2')))

    def print_expr(expr):
        print(f'{expr} is type {type(expr)}')
    print_expr((px == py))
    print_expr((px < py))
    print_expr(((px == py) & (px < py)))
    print_expr((((px == py) & (px < py)) | (px > py)))
    print_expr((px < 5))
    print_expr((px >= 5))
def test_comparison_refs():

    def dummy_node(node_id) -> Node:
        n = Node(node_id, metadata=None, bindings=[], upstream_nodes=[], flyte_entity=SQLTask(name='x', query_template='x', inputs={}))
        n._id = node_id
        return n
    px = Promise('x', NodeOutput(var='x', node=dummy_node('n1')))
    py = Promise('y', NodeOutput(var='y', node=dummy_node('n2')))

    def print_expr(expr):
        print(f'{expr} is type {type(expr)}')
    print_expr((px == py))
    print_expr((px < py))
    print_expr(((px == py) & (px < py)))
    print_expr((((px == py) & (px < py)) | (px > py)))
    print_expr((px < 5))
    print_expr((px >= 5))