[SQL] Minor fix for TreeNode

1 remove `case` never reached
2 add transformUp for test("transform works on nodes with Option children")