Skip to content

Commit e964475

Browse files
authored
[QPROF] Enhancement + misc (#1302)
* [QPROF] Enhancement + misc - Rewriting some definition. - Should close: * QPROF Enhancement
1 parent d70b7b2 commit e964475

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

verticapy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
__license__: str = "Apache License, Version 2.0"
3939
__version__: str = "1.1.0-beta"
4040
__iteration__: int = 1
41-
__date__: str = "10042024"
42-
__last_commit__: str = "b229f82d26eb61ddfc0375a7169e27a33f60340a"
41+
__date__: str = "10052024"
42+
__last_commit__: str = "a58bb45bb5a8e491e36b14a7346a730206c1c821"
4343
__long_version__: str = f"{__version__}-{__iteration__}{__date__}-{__last_commit__}"
4444
__codecov__: float = 0.84
4545

verticapy/core/vdataframe/_plotting.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ def bar(
253253
(ex: 50% to get the median).
254254
- None:
255255
No Aggregations. Parameter ``of``
256-
must not be empty, otherwise it
257-
is ignored.
256+
must be empty, otherwise it is
257+
ignored.
258258
259259
It can also be a cutomized aggregation,
260260
for example: ``AVG(column1) + 5``
@@ -543,8 +543,8 @@ def barh(
543543
(ex: 50% to get the median).
544544
- None:
545545
No Aggregations. Parameter ``of``
546-
must not be empty, otherwise it
547-
is ignored.
546+
must be empty, otherwise it is
547+
ignored.
548548
549549
It can also be a cutomized aggregation,
550550
for example: ``AVG(column1) + 5``
@@ -2188,10 +2188,7 @@ def hexbin(
21882188
:py:class:`~vDataColumns` ``of``
21892189
(ex: 50% to get the median).
21902190
- None:
2191-
No Aggregations. Parameter ``of``
2192-
must not be empty, otherwise it
2193-
is ignored. The function to draw
2194-
the final chart will be ``max```.
2191+
No Aggregations.
21952192
21962193
of: str, optional
21972194
The vDataColumn used to compute the aggregation.

verticapy/core/vdataframe/_sys.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,14 +1328,14 @@ def rename(
13281328
13291329
.. warning::
13301330
1331-
SQL code generation will be slower if the
1332-
vDataFrame has been transformed multiple
1333-
times, so it's better practice to use this
1334-
method when first preparing your data.
1335-
It is even recommended to use directly
1331+
SQL code generation will be slower if the
1332+
``vDataFrame`` has been transformed multiple
1333+
times, so it's better to use this method when
1334+
first preparing your data. It is even
1335+
recommended to use the
13361336
``vDataFrame.``:py:meth:`~verticapy.vDataFrame.select`
1337-
method and do all the renaming within
1338-
one single operation.
1337+
method directly and perform all renaming within
1338+
a single operation.
13391339
13401340
Parameters
13411341
----------

verticapy/performance/vertica/qprof.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ class QueryProfiler:
9999
the ``transaction_id``; the ``statement_id``
100100
will automatically be set to 1.
101101
- A ``str``:
102-
The query to execute.
102+
The query to execute. If the ``str`` ends
103+
with '.sql', it is considered a SQL file,
104+
and the query inside will be executed.
103105
- A ``list`` of ``str``:
104106
The ``list`` of queries to execute. Each
105107
query will be execute iteratively.
@@ -1179,6 +1181,9 @@ def __init__(
11791181
title="Setting the resource pool.",
11801182
method="cursor",
11811183
)
1184+
if request[-4:] == ".sql":
1185+
with open(request, "r") as file:
1186+
request = file.read()
11821187
if add_profile:
11831188
fword = clean_query(request).strip().split()[0].lower()
11841189
if fword != "profile":

0 commit comments

Comments
 (0)