-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Big Number with Trendline coudn't work with PostgreSQL's date field #20155
Comments
@ensky what is the datatype of |
@villebro It's
|
@villebro I can reproduce it in SQL Lab with your reproduce step with query
pgsql version |
I am facing same issue with all Time-series charts(echarts and legacy both). The issue seems to be handling of |
It looks like an issue that popped somewhere else, and that was fixed by upgrading |
@ensky I'm not able to reproduce the error with the query you provided:
Executed tests:
|
Seems like issue is something else. Local docker setup doesn't show issue, but kubernetes setup shows issue. I have older version of postgres in k8s, so that may be the issue. |
True. Our environment is located on the k8s indeed. |
What's the Postgres version in k8s? |
@michael-s-molina As mentioned above, it's 12.7 |
I misunderstood 😄 , I thought that when @kamalkeshavani-aiinside commented:
He was already considering the previous comment and that we tested on versions 12 and 12.11. |
Me too. For me, this issue was introduced with the upgrade to 1.5.0. Unfortunately, a downgrade does not work ("Databases" is empty after downgrade). Maybe the FutureWarning at the top of my (redacted) stack trace contains a valuable hint for one of you:
|
As noted by @ensky in apache#20155 the format returned by Postgres' DATE_TRUNC is not compatible (any more?). This is a quick fix that works for me.
I can confirm that with psycopg2=2.9.1 the problem is solved. So it seems to be the problem about k8s setup example located in https://superset.apache.org/docs/installation/running-on-kubernetes , and which instructed to Anyone may change it to |
Thanks for reporting this @ensky and also for submitting a PR to update the guide 🙂 |
I cannot confirm this resolution. Upgrading superset to 1.5.1 via pip. The problem persists for me. pip even upgrades to psycopg2==2.9.3. Also, manually downgrading to 2.9.1 does not resolve the issue. The patch in 0b49ca6 still works. |
This is really useful. Setting psycopg2==2.9.3 works for me (Using superset 2.0.0 Docker Image) |
Perhaps this is an issue with my PostgreSQL version (14). Anyway, c61ac76 is an updated patch to fix the timezone issue if (like me) the psycopg2 upgrade does not resolve it for you. This is better than my previous patch, because it is also compatible with using Prophet. |
Big Number with Trendline coudn't work with PostgreSQL's date field.
How to reproduce the bug
which +08 is the timezone about your pgsql settings
Expected results
The chart should be draw successfully
Actual results
Screenshots
Additional Error Log
Environment
Checklist
Additional context
The SQL in the chart is
The error part seems to be the DATE_TRUNC function, it returns something like "2022-05-23 12:00:00+08". Which format seems to be errorly processed by pyarrow project.
Accourding to pyarrow project, the timezone format seems to be like +08:00 format, maybe it's the root cuase? https://github.com/apache/arrow/blob/apache-arrow-5.0.0/python/pyarrow/types.pxi#L1915
The text was updated successfully, but these errors were encountered: