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
🤔 maybe we need to use Decimal type rather than Float for constants. When we initially ran TPCH we did not have support for this data type, but now thanks to the work from @liukun4515 (and others) we do!
🤔 maybe we need to use Decimal type rather than Float for constants. When we initially ran TPCH we did not have support for this data type, but now thanks to the work from @liukun4515 (and others) we do!
I see where to make the change (parse_sql_number() inside planner.rs), but I'm struggling trying to figure out how to turn the string input to a Decimal128 type. Can you give me some pointers?
I see where to make the change (parse_sql_number() inside planner.rs), but I'm struggling trying to figure out how to turn the string input to a Decimal128 type. Can you give me some pointers?
Do you want to convert string value of string data type like "123.13" to the decimal128 data type?
hi @liukun4515, no, with decimal its still not the right result and I'm not sure why yet. but it's much closer:
Left: ["123141078.23"]
Right: ["123140554.79"]
I think it's correct behavior to use the Decimal type to represent non-integer numeric literals in the SQL, so I'm going to open a separate issue for that and will ask you to review that, because I'm unsure how to convert to Decimal128 efficiently.
Activity
nevi-me commentedon Jun 25, 2022
The problem with the query is that
0.5 + 0.2gets parsed as0.69999999_alamb commentedon Jun 26, 2022
🤔 maybe we need to use
Decimaltype rather thanFloatfor constants. When we initially ran TPCH we did not have support for this data type, but now thanks to the work from @liukun4515 (and others) we do!kmitchener commentedon Sep 7, 2022
That would probably do it. Postgres also converts decimal literals in the sql statement to decimal types. https://stackoverflow.com/questions/68142210/what-is-the-type-of-100-0-in-postgresql
I see where to make the change (parse_sql_number() inside planner.rs), but I'm struggling trying to figure out how to turn the string input to a Decimal128 type. Can you give me some pointers?
kmitchener commentedon Sep 7, 2022
Hm, I realize now I should be converting from float to Decimal128 :)
liukun4515 commentedon Sep 8, 2022
@kmitchener
After convert to decimal128, can we get the right result for Q6?
liukun4515 commentedon Sep 8, 2022
Do you want to convert string value of string data type like
"123.13"to the decimal128 data type?kmitchener commentedon Sep 8, 2022
hi @liukun4515, no, with decimal its still not the right result and I'm not sure why yet. but it's much closer:
I think it's correct behavior to use the Decimal type to represent non-integer numeric literals in the SQL, so I'm going to open a separate issue for that and will ask you to review that, because I'm unsure how to convert to Decimal128 efficiently.
Rewrite Filter Predicate (#192)
Projection Pushdown (#211)
Rewrite Filter Predicate (#192)
Projection Pushdown (#211)
Add Python wrapper for LogicalPlan::Filter (apache#192)