Closed TheCedarPrince closed 2 years ago
Describe the bug
I was using the documentation on the Define functionality in building a query that defines a new column. Currently, this function seems to be broken
Define
To Reproduce
Julia Version (i.e. output of julia -v): 1.6.1
julia -v
Operating system (Mac, Linux, Windows): macOS Catalina 10.15.7
FunSQL Version: FunSQL v0.7.0
Minimum working code example that led to bug:
using LibPQ const conn = LibPQ.Connection("CREDENTIALS") const person = SQLTable(:person, columns = [:person_id, :year_of_birth, :location_id]) const location = SQLTable(:location, columns = [:location_id, :city, :state]) q = From(person) |> Define(:age => 2021 .- Get.year_of_birth) |> Where(Get.age .> 16) sql = render(q, dialect = :postgresql) res = LibPQ.execute(conn, sql) test = DataFrame(res)
Expected Behavior and Actual Behavior
I was expecting a final table that contains a new column named age but after SQL rendering, there is no new column being generated.
age
julia> print(sql) SELECT "person_1"."person_id", "person_1"."year_of_birth", "person_1"."location_id", [...other columns...] FROM "synpuf5"."person" AS "person_1" WHERE ((2021 - "person_1"."year_of_birth") > 16)
Stacktrace (If Applicable)
No error available.
Screenshots
N/A
Additional context
@xitology just informed me that this is fixed within the current master branch. I suppose I will leave this open (unless you want to close it sooner) for the upcoming tagged release.
Describe the bug
I was using the documentation on the
Define
functionality in building a query that defines a new column. Currently, this function seems to be brokenTo Reproduce
Julia Version (i.e. output of
julia -v
): 1.6.1Operating system (Mac, Linux, Windows): macOS Catalina 10.15.7
FunSQL Version: FunSQL v0.7.0
Minimum working code example that led to bug:
Expected Behavior and Actual Behavior
I was expecting a final table that contains a new column named
age
but after SQL rendering, there is no new column being generated.Stacktrace (If Applicable)
No error available.
Screenshots
N/A
Additional context
N/A