Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to resolve column from last join in request-cluster-optimized mode #3491

Closed
aceforeverd opened this issue Sep 4, 2023 · 2 comments · Fixed by #3493
Closed

unable to resolve column from last join in request-cluster-optimized mode #3491

aceforeverd opened this issue Sep 4, 2023 · 2 comments · Fixed by #3493
Assignees
Labels
bug Something isn't working execute-engine hybridse sql engine high-priority sql SQL standard. definition/revise for a SQL statement/clause etc

Comments

@aceforeverd
Copy link
Collaborator

      select                          
        account_no,         
        count(account_no) over w as cnt,
         -- check if there exists in window that right source agreement_no is null
         nvl2(nth_value_where(account_no, 1, isnull(agreement_no)) over w, 1, 0) as feat1,
         case when count_where(account_no, isnull(agreement_no)) over w > 0 then 1 else 0 end as feat2                 
      from (select account_no, 0 as agreement_no, cast(90000 as timestamp) as ts from request)                         
      window w as (     
         union (select t14.account_no, t16.agreement_nox as agreement_no, t14.ts from t14 last join t16 on t14.agreement_no = t16.agreement_nox)
         partition by account_no order by ts
         rows between unbounded preceding and current row
         exclude current_row instance_not_in_window
      )

unable to find .t14.col2

@aceforeverd aceforeverd added bug Something isn't working execute-engine hybridse sql engine sql SQL standard. definition/revise for a SQL statement/clause etc labels Sep 4, 2023
@aceforeverd aceforeverd self-assigned this Sep 4, 2023
@aceforeverd

This comment was marked as outdated.

@aceforeverd
Copy link
Collaborator Author

A left TODO from #3205 (comment)

window ( union = multiple join )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working execute-engine hybridse sql engine high-priority sql SQL standard. definition/revise for a SQL statement/clause etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants