You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When querying SQL server table, we encountered an error.
[ ... ERROR tiberius::tds::stream::token] The function 'PERCENTILE_DISC' must have an OVER clause. code=10753
This doesn't happen for all the table queries, but frequent enough. It seems only happen when read_sql is called with with partition column and number of partitions specified.
This happens on both Linux and Windows system. I was told we can safely ignore this, but it will be nice if it can be fixed. This might be SQL code generation bug for SQL Server (maybe for other database as well). So fix might be pretty easy.
To Reproduce
Create a SQL database table with large number of rows with an integer column. Query the table using read_sql with SELECT * FROM table. Specify the integer column as the partition column, and a number > 1 as the partition number.
Expected behavior
return a dafa dataframe with no error
Component(s)
SQL
Additional context
No response
The text was updated successfully, but these errors were encountered:
Addresses: #3075
SQL server requires an `OVER` clause to be specified in percentile
queries (because it's a window function). Read sql uses percentiles to
determine partition bounds.
Adds AzureSqlEdge as a test database. Might as well since a lot of ppl
use us to read sqlserver, and have had bugs with sql server. Kind of a
pain to get it set up since it requires odbc and drivers etc. but it
works. It's also not much of a hit on CI times, installing drivers takes
around ~15s and the extra tests take around 5s.
Additionally made some modifications to some tests and pushdowns, left
comments on the rationale.
---------
Co-authored-by: Colin Ho <colinho@Colins-MacBook-Pro.local>
Co-authored-by: Colin Ho <colinho@Colins-MBP.localdomain>
Describe the bug
When querying SQL server table, we encountered an error.
[ ... ERROR tiberius::tds::stream::token] The function 'PERCENTILE_DISC' must have an OVER clause. code=10753
This doesn't happen for all the table queries, but frequent enough. It seems only happen when read_sql is called with with partition column and number of partitions specified.
This happens on both Linux and Windows system. I was told we can safely ignore this, but it will be nice if it can be fixed. This might be SQL code generation bug for SQL Server (maybe for other database as well). So fix might be pretty easy.
To Reproduce
Create a SQL database table with large number of rows with an integer column. Query the table using read_sql with SELECT * FROM table. Specify the integer column as the partition column, and a number > 1 as the partition number.
Expected behavior
return a dafa dataframe with no error
Component(s)
SQL
Additional context
No response
The text was updated successfully, but these errors were encountered: