-
Notifications
You must be signed in to change notification settings - Fork 9
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
Remove quoting check for TVFs and Procedures during analysis #79
Comments
Hello,
Same part of Rewritten Query.
I debugged the code, but I could not understand the reason of this bug. I think it is writing the quoted string to the wrong position. But I am not sure. Thanks in advance. |
Thanks for pointing this out! Can you share a full query that has this issue? I'm having trouble reproducing it |
Removed the problematic checks this issue refers to. I'm keeping the issue open to see about the quoting issue mentioned. @TunahanOcal I haven't been able to reproduce the behavior you're mentioning. It'd be awesome if you can share a whole query with the problem and I can help debug it. Here's an example I put together using your fragment that works as expected. -- Original
WITH sam AS (
SELECT 1 AS amountt,
CAST(NULL AS FLOAT64) AS commission_rate1,
0.05 commission_rate2
)
SELECT
round(sam.amountt, 2) as refundCashAmount,
round(sam.amountt, 2) as price,
ifnull(sam.commission_rate1, sam.commission_rate2) as commission
FROM sam;
-- Requoted
WITH sam AS (
SELECT 1 AS amountt,
CAST(NULL AS FLOAT64) AS commission_rate1,
0.05 commission_rate2
)
SELECT
`round`(sam.amountt, 2) as refundCashAmount,
`round`(sam.amountt, 2) as price,
`ifnull`(sam.commission_rate1, sam.commission_rate2) as commission
FROM `sam`; |
Hello again, |
In the past, we needed procedure and TVF references to be fully quoted in a query for catalog resolution to work. To that end, we added this check to the analyzer that would throw an exception if it found a procedure or TVF which wasn't fully quoted.
Since then, we've updated the analyzer to rewrite queries and fully quote all resources before analysis. This makes the original check redundant and it should be removed.
The text was updated successfully, but these errors were encountered: