GithubHelp home page GithubHelp logo

Comments (5)

hbutani avatar hbutani commented on July 19, 2024

Yes, this is a limitation. Currently the groovy expressions are not validated.
But if all you are doing is referring a column then for e.g.
sum() will not catch the issue but
sum(col) will catch the issue.

does this make sense. Or send me your query, let me take a look.

from sqlwindowing.

achaubal avatar achaubal commented on July 19, 2024

the error was not in the "with" clause but rather the "select" that comes after the with. I was typing a wrong column name in there and it didn't detect the error till the final reduce.

Also, it doesn't catch division by zero and reports a ratio as Infinity in the final output; not sure if that's a problem or feature, but just wanted to mention.

from sqlwindowing.

hbutani avatar hbutani commented on July 19, 2024

can you post your query.

from sqlwindowing.

achaubal avatar achaubal commented on July 19, 2024

from <select acct_no,to_date(my_dt) my_date,
tot_bal,denom_bal
from mon_2011_08_all_attrib>
partition by acct_no
order by acct_no,my_date asc
with rank() as r,
avg (<tot_bal/denom_bal>) over rows between 3 preceding and current row as ma4_ratio,
last_value(<tot_bal/denom_bal>) over rows between 1 preceding and current row as prev_ratio,
ntile(5) as percentile_5
select acct_no,my_date,my_ratio,r,ma4_ratio,prev_ratio,percentile_5
into path='ma_6_2011_08';

my_ratio is the column that was not available in the query, I cause made the ratio up in the "with" clause

from sqlwindowing.

hbutani avatar hbutani commented on July 19, 2024

The error indication should happen w/o delay. This was related to issue 5.
But let me check about catching the incorrect column name in the select list

from sqlwindowing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.