Skip to content
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

Bump sqlglot from 22.2.1 to 22.3.1 #170

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 11, 2024

Bumps sqlglot from 22.2.1 to 22.3.1.

Changelog

Sourced from sqlglot's changelog.

[v22.3.1] - 2024-03-09

✨ New Features

🐛 Bug Fixes

[v22.3.0] - 2024-03-08

✨ New Features

🐛 Bug Fixes

♻️ Refactors

🔧 Chores

Commits
  • fa84e2c Fix: copy all arg keys, including those set to None (#3108)
  • 80b2320 feat: no recursion dfs (#3105)
  • 973285d docs: update API docs, CHANGELOG.md for v22.3.0 [skip ci]
  • ebe5a46 Refactor(executor): simplify column type inference (#3104)
  • 18fd079 feat: no recursion copy (#3103)
  • a38db01 feat: Generalizing CREATE SEQUENCE (#3090)
  • 8d5be0c Feat(duckdb): make ARRAY_TO_STRING transpilable to other dialects
  • ddab9df feat(duckdb): add support for exp.ArrayJoin (#3102)
  • efee388 feat: no more recursion for union generation (#3101)
  • 8a34fb4 Refactor!(optimizer): only create scopes for the DDL queries (#3096)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner March 11, 2024 09:44
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Mar 11, 2024
@dependabot dependabot bot requested a review from nsenno-dbr March 11, 2024 09:44
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.89%. Comparing base (c0311d3) to head (79ca57f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #170   +/-   ##
=======================================
  Coverage   95.89%   95.89%           
=======================================
  Files          19       19           
  Lines        1218     1218           
  Branches      197      197           
=======================================
  Hits         1168     1168           
  Misses         25       25           
  Partials       25       25           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@sundarshankar89 sundarshankar89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Bumps [sqlglot](https://github.com/tobymao/sqlglot) from 22.2.1 to 22.3.1.
- [Changelog](https://github.com/tobymao/sqlglot/blob/main/CHANGELOG.md)
- [Commits](tobymao/sqlglot@v22.2.1...v22.3.1)

---
updated-dependencies:
- dependency-name: sqlglot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/sqlglot-22.3.1 branch from 044c84b to 79ca57f Compare March 11, 2024 10:32
@sundarshankar89 sundarshankar89 added this pull request to the merge queue Mar 11, 2024
Merged via the queue into main with commit 9a92408 Mar 11, 2024
6 checks passed
@sundarshankar89 sundarshankar89 deleted the dependabot/pip/sqlglot-22.3.1 branch March 11, 2024 10:37
sundarshankar89 added a commit that referenced this pull request Mar 15, 2024
* Added Pylint Checker ([#149](#149)). This diff adds a Pylint checker to the project, which is used to enforce a consistent code style, identify potential bugs, and check for errors in the Python code. The configuration for Pylint includes various settings, such as a line length limit, the maximum number of arguments for a function, and the maximum number of lines in a module. Additionally, several plugins have been specified to load, which add additional checks and features to Pylint. The configuration also includes settings that customize the behavior of Pylint's naming conventions checks and handle various types of code constructs, such as exceptions, logging statements, and import statements. By using Pylint, the project can help ensure that its code is of high quality, easy to understand, and free of bugs. This diff includes changes to various files, such as cli.py, morph_status.py, validate.py, and several SQL-related files, to ensure that they adhere to the desired Pylint configuration and best practices for code quality and organization.
* Fixed edge case where column name is same as alias name ([#164](#164)). A recent commit has introduced fixes for edge cases related to conflicts between column names and alias names in SQL queries, addressing issues [#164](#164) and [#130](#130). The `check_for_unsupported_lca` function has been updated with two helper functions `_find_aliases_in_select` and `_find_invalid_lca_in_window` to detect aliases with the same name as a column in a SELECT expression and identify invalid Least Common Ancestors (LCAs) in window functions, respectively. The `find_windows_in_select` function has been refactored and renamed to `_find_windows_in_select` for improved code readability. The `transpile` and `parse` functions in the `sql_transpiler.py` file have been updated with try-except blocks to handle cases where a column name matches the alias name, preventing errors or exceptions such as `ParseError`, `TokenError`, and `UnsupportedError`. A new unit test, "test_query_with_same_alias_and_column_name", has been added to verify the fix, passing a SQL query with a subquery having a column alias `ca_zip` which is also used as a column name in the same query, confirming that the function correctly handles the scenario where a column name conflicts with an alias name.
* `TO_NUMBER` without `format` edge case ([#172](#172)). The `TO_NUMBER without format edge case` commit introduces changes to address an unsupported usage of the `TO_NUMBER` function in Databicks SQL dialect when the `format` parameter is not provided. The new implementation introduces constants `PRECISION_CONST` and `SCALE_CONST` (set to 38 and 0 respectively) as default values for `precision` and `scale` parameters. These changes ensure Databricks SQL dialect requirements are met by modifying the `_to_number` method to incorporate these constants. An `UnsupportedError` will now be raised when `TO_NUMBER` is called without a `format` parameter, improving error handling and ensuring users are aware of the required `format` parameter. Test cases have been added for `TO_DECIMAL`, `TO_NUMERIC`, and `TO_NUMBER` functions with format strings, covering cases where the format is taken from table columns. The commit also ensures that an error is raised when `TO_DECIMAL` is called without a format parameter.

Dependency updates:

 * Bump sqlglot from 21.2.1 to 22.0.1 ([#152](#152)).
 * Bump sqlglot from 22.0.1 to 22.1.1 ([#159](#159)).
 * Updated databricks-labs-blueprint[yaml] requirement from ~=0.2.3 to >=0.2.3,<0.4.0 ([#162](#162)).
 * Bump sqlglot from 22.1.1 to 22.2.0 ([#161](#161)).
 * Bump sqlglot from 22.2.0 to 22.2.1 ([#163](#163)).
 * Updated databricks-sdk requirement from <0.21,>=0.18 to >=0.18,<0.22 ([#168](#168)).
 * Bump sqlglot from 22.2.1 to 22.3.1 ([#170](#170)).
 * Updated databricks-labs-blueprint[yaml] requirement from <0.4.0,>=0.2.3 to >=0.2.3,<0.5.0 ([#171](#171)).
 * Bump sqlglot from 22.3.1 to 22.4.0 ([#173](#173)).
@sundarshankar89 sundarshankar89 mentioned this pull request Mar 15, 2024
github-merge-queue bot pushed a commit that referenced this pull request Mar 15, 2024
* Added Pylint Checker
([#149](#149)). This
diff adds a Pylint checker to the project, which is used to enforce a
consistent code style, identify potential bugs, and check for errors in
the Python code. The configuration for Pylint includes various settings,
such as a line length limit, the maximum number of arguments for a
function, and the maximum number of lines in a module. Additionally,
several plugins have been specified to load, which add additional checks
and features to Pylint. The configuration also includes settings that
customize the behavior of Pylint's naming conventions checks and handle
various types of code constructs, such as exceptions, logging
statements, and import statements. By using Pylint, the project can help
ensure that its code is of high quality, easy to understand, and free of
bugs. This diff includes changes to various files, such as cli.py,
morph_status.py, validate.py, and several SQL-related files, to ensure
that they adhere to the desired Pylint configuration and best practices
for code quality and organization.
* Fixed edge case where column name is same as alias name
([#164](#164)). A recent
commit has introduced fixes for edge cases related to conflicts between
column names and alias names in SQL queries, addressing issues
[#164](#164) and
[#130](#130). The
`check_for_unsupported_lca` function has been updated with two helper
functions `_find_aliases_in_select` and `_find_invalid_lca_in_window` to
detect aliases with the same name as a column in a SELECT expression and
identify invalid Least Common Ancestors (LCAs) in window functions,
respectively. The `find_windows_in_select` function has been refactored
and renamed to `_find_windows_in_select` for improved code readability.
The `transpile` and `parse` functions in the `sql_transpiler.py` file
have been updated with try-except blocks to handle cases where a column
name matches the alias name, preventing errors or exceptions such as
`ParseError`, `TokenError`, and `UnsupportedError`. A new unit test,
"test_query_with_same_alias_and_column_name", has been added to verify
the fix, passing a SQL query with a subquery having a column alias
`ca_zip` which is also used as a column name in the same query,
confirming that the function correctly handles the scenario where a
column name conflicts with an alias name.
* `TO_NUMBER` without `format` edge case
([#172](#172)). The
`TO_NUMBER without format edge case` commit introduces changes to
address an unsupported usage of the `TO_NUMBER` function in Databicks
SQL dialect when the `format` parameter is not provided. The new
implementation introduces constants `PRECISION_CONST` and `SCALE_CONST`
(set to 38 and 0 respectively) as default values for `precision` and
`scale` parameters. These changes ensure Databricks SQL dialect
requirements are met by modifying the `_to_number` method to incorporate
these constants. An `UnsupportedError` will now be raised when
`TO_NUMBER` is called without a `format` parameter, improving error
handling and ensuring users are aware of the required `format`
parameter. Test cases have been added for `TO_DECIMAL`, `TO_NUMERIC`,
and `TO_NUMBER` functions with format strings, covering cases where the
format is taken from table columns. The commit also ensures that an
error is raised when `TO_DECIMAL` is called without a format parameter.

Dependency updates:

* Bump sqlglot from 21.2.1 to 22.0.1
([#152](#152)).
* Bump sqlglot from 22.0.1 to 22.1.1
([#159](#159)).
* Updated databricks-labs-blueprint[yaml] requirement from ~=0.2.3 to
>=0.2.3,<0.4.0
([#162](#162)).
* Bump sqlglot from 22.1.1 to 22.2.0
([#161](#161)).
* Bump sqlglot from 22.2.0 to 22.2.1
([#163](#163)).
* Updated databricks-sdk requirement from <0.21,>=0.18 to >=0.18,<0.22
([#168](#168)).
* Bump sqlglot from 22.2.1 to 22.3.1
([#170](#170)).
* Updated databricks-labs-blueprint[yaml] requirement from
<0.4.0,>=0.2.3 to >=0.2.3,<0.5.0
([#171](#171)).
* Bump sqlglot from 22.3.1 to 22.4.0
([#173](#173)).
sundarshankar89 pushed a commit to sundarshankar89/remorph that referenced this pull request Jan 2, 2025
Bumps [sqlglot](https://github.com/tobymao/sqlglot) from 22.2.1 to
22.3.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tobymao/sqlglot/blob/main/CHANGELOG.md">sqlglot's
changelog</a>.</em></p>
<blockquote>
<h2>[v22.3.1] - 2024-03-09</h2>
<h3>:sparkles: New Features</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/80b23201f9668a5845002c1c21b0a394003847f9"><code>80b2320</code></a>
- no recursion dfs <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3105">#3105</a>
by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
</ul>
<h3>:bug: Bug Fixes</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/fa84e2c2d9ae349033039ec649decc371561e421"><code>fa84e2c</code></a>
- copy all arg keys, including those set to None <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3108">#3108</a>
by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em></li>
</ul>
<h2>[v22.3.0] - 2024-03-08</h2>
<h3>:sparkles: New Features</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/46c9c2c35ea5132995cb07a99b94d18d959e6172"><code>46c9c2c</code></a>
- <strong>snowflake</strong>: parse CREATE SEQUENCE <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3072">#3072</a>
by <a
href="https://github.com/tekumara"><code>@​tekumara</code></a>)</em>
<ul>
<li>:arrow_lower_right: <em>addresses issue <a
href="https://redirect.github.com/tobymao/sqlglot/issues/2954">#2954</a>
opened by <a
href="https://github.com/tharwan"><code>@​tharwan</code></a></em></li>
</ul>
</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/9f1e1ad4350fb412319511825ca3da9b9af14084"><code>9f1e1ad</code></a>
- add Athena dialect <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3089">#3089</a>
by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em>
<ul>
<li>:arrow_lower_right: <em>addresses issue <a
href="https://redirect.github.com/tobymao/sqlglot/issues/3087">#3087</a>
opened by <a
href="https://github.com/sbrandtb"><code>@​sbrandtb</code></a></em></li>
</ul>
</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/efee38858c4501ccace4b3eb3f066cb352f3ac60"><code>efee388</code></a>
- no more recursion for union generation <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3101">#3101</a>
by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/ddab9dff663985d9473ce4b2dbe4fe266ae1bdf7"><code>ddab9df</code></a>
- <strong>duckdb</strong>: add support for exp.ArrayJoin <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3102">#3102</a>
by <a
href="https://github.com/seruman"><code>@​seruman</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/8d5be0cf54e77000b220cfcca0edfdeb1759b70b"><code>8d5be0c</code></a>
- <strong>duckdb</strong>: make ARRAY_TO_STRING transpilable to other
dialects <em>(commit by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/a38db014cce8ada9554c205c879ae0c0dfda1b14"><code>a38db01</code></a>
- Generalizing CREATE SEQUENCE <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3090">#3090</a>
by <a
href="https://github.com/VaggelisD"><code>@​VaggelisD</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/18fd0794302a1ecaa91be9dfbc7feddd0b8a3b05"><code>18fd079</code></a>
- no recursion copy <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3103">#3103</a>
by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
</ul>
<h3>:bug: Bug Fixes</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/b101013336d0aef6dc99b5ebef85afc12591e212"><code>b101013</code></a>
- subquery edge cases <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3076">#3076</a>
by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/8c4400ba194661d1e1ee4aa4ea2649b2356a5f02"><code>8c4400b</code></a>
- <strong>bigquery</strong>: more table qualification edge cases closes
<a
href="https://redirect.github.com/tobymao/sqlglot/pull/3083">#3083</a>
<em>(commit by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/d898f559fac44789da08689e835619f978c05a3e"><code>d898f55</code></a>
- <strong>bigquery</strong>: even more edge cases <em>(commit by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/4fb74ff61effd9e5fa8593cdf1c9229d5106ab7e"><code>4fb74ff</code></a>
- dataframe optimize user input <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3092">#3092</a>
by <a
href="https://github.com/eakmanrq"><code>@​eakmanrq</code></a>)</em>
<ul>
<li>:arrow_lower_right: <em>fixes issue <a
href="https://redirect.github.com/tobymao/sqlglot/issues/3091">#3091</a>
opened by <a
href="https://github.com/alexdemeo"><code>@​alexdemeo</code></a></em></li>
</ul>
</li>
</ul>
<h3>:recycle: Refactors</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/cea7508c5f2b5838e889486d28df47ad9b263345"><code>cea7508</code></a>
- <strong>lineage</strong>: simplify <code>Node.walk()</code> <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3098">#3098</a>
by <a
href="https://github.com/rexledesma"><code>@​rexledesma</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/ebe5a462ed50711d6ded18b454c5294e487e323f"><code>ebe5a46</code></a>
- <strong>executor</strong>: simplify column type inference <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3104">#3104</a>
by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em></li>
</ul>
<h3>:wrench: Chores</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/6c67a2b0dbe2a66ea4ce2e008101f4cf41b1c517"><code>6c67a2b</code></a>
- reduce size of tpcds <em>(commit by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/21e4fca2b744a22981d8ff1696986061d3344d40"><code>21e4fca</code></a>
- update dialect count in README to include Athena <em>(commit by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/fa84e2c2d9ae349033039ec649decc371561e421"><code>fa84e2c</code></a>
Fix: copy all arg keys, including those set to None (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3108">#3108</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/80b23201f9668a5845002c1c21b0a394003847f9"><code>80b2320</code></a>
feat: no recursion dfs (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3105">#3105</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/973285d9370081aa7b6259d901f8d31744a586a9"><code>973285d</code></a>
docs: update API docs, CHANGELOG.md for v22.3.0 [skip ci]</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/ebe5a462ed50711d6ded18b454c5294e487e323f"><code>ebe5a46</code></a>
Refactor(executor): simplify column type inference (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3104">#3104</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/18fd0794302a1ecaa91be9dfbc7feddd0b8a3b05"><code>18fd079</code></a>
feat: no recursion copy (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3103">#3103</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/a38db014cce8ada9554c205c879ae0c0dfda1b14"><code>a38db01</code></a>
feat: Generalizing CREATE SEQUENCE (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3090">#3090</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/8d5be0cf54e77000b220cfcca0edfdeb1759b70b"><code>8d5be0c</code></a>
Feat(duckdb): make ARRAY_TO_STRING transpilable to other dialects</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/ddab9dff663985d9473ce4b2dbe4fe266ae1bdf7"><code>ddab9df</code></a>
feat(duckdb): add support for exp.ArrayJoin (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3102">#3102</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/efee38858c4501ccace4b3eb3f066cb352f3ac60"><code>efee388</code></a>
feat: no more recursion for union generation (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3101">#3101</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/8a34fb433bc33551febe96665e16668de73e5bd6"><code>8a34fb4</code></a>
Refactor!(optimizer): only create scopes for the DDL queries (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3096">#3096</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tobymao/sqlglot/compare/v22.2.1...v22.3.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sqlglot&package-manager=pip&previous-version=22.2.1&new-version=22.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
sundarshankar89 pushed a commit to sundarshankar89/remorph that referenced this pull request Jan 3, 2025
Bumps [sqlglot](https://github.com/tobymao/sqlglot) from 22.2.1 to
22.3.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tobymao/sqlglot/blob/main/CHANGELOG.md">sqlglot's
changelog</a>.</em></p>
<blockquote>
<h2>[v22.3.1] - 2024-03-09</h2>
<h3>:sparkles: New Features</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/80b23201f9668a5845002c1c21b0a394003847f9"><code>80b2320</code></a>
- no recursion dfs <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3105">#3105</a>
by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
</ul>
<h3>:bug: Bug Fixes</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/fa84e2c2d9ae349033039ec649decc371561e421"><code>fa84e2c</code></a>
- copy all arg keys, including those set to None <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3108">#3108</a>
by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em></li>
</ul>
<h2>[v22.3.0] - 2024-03-08</h2>
<h3>:sparkles: New Features</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/46c9c2c35ea5132995cb07a99b94d18d959e6172"><code>46c9c2c</code></a>
- <strong>snowflake</strong>: parse CREATE SEQUENCE <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3072">#3072</a>
by <a
href="https://github.com/tekumara"><code>@​tekumara</code></a>)</em>
<ul>
<li>:arrow_lower_right: <em>addresses issue <a
href="https://redirect.github.com/tobymao/sqlglot/issues/2954">#2954</a>
opened by <a
href="https://github.com/tharwan"><code>@​tharwan</code></a></em></li>
</ul>
</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/9f1e1ad4350fb412319511825ca3da9b9af14084"><code>9f1e1ad</code></a>
- add Athena dialect <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3089">#3089</a>
by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em>
<ul>
<li>:arrow_lower_right: <em>addresses issue <a
href="https://redirect.github.com/tobymao/sqlglot/issues/3087">#3087</a>
opened by <a
href="https://github.com/sbrandtb"><code>@​sbrandtb</code></a></em></li>
</ul>
</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/efee38858c4501ccace4b3eb3f066cb352f3ac60"><code>efee388</code></a>
- no more recursion for union generation <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3101">#3101</a>
by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/ddab9dff663985d9473ce4b2dbe4fe266ae1bdf7"><code>ddab9df</code></a>
- <strong>duckdb</strong>: add support for exp.ArrayJoin <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3102">#3102</a>
by <a
href="https://github.com/seruman"><code>@​seruman</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/8d5be0cf54e77000b220cfcca0edfdeb1759b70b"><code>8d5be0c</code></a>
- <strong>duckdb</strong>: make ARRAY_TO_STRING transpilable to other
dialects <em>(commit by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/a38db014cce8ada9554c205c879ae0c0dfda1b14"><code>a38db01</code></a>
- Generalizing CREATE SEQUENCE <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3090">#3090</a>
by <a
href="https://github.com/VaggelisD"><code>@​VaggelisD</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/18fd0794302a1ecaa91be9dfbc7feddd0b8a3b05"><code>18fd079</code></a>
- no recursion copy <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3103">#3103</a>
by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
</ul>
<h3>:bug: Bug Fixes</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/b101013336d0aef6dc99b5ebef85afc12591e212"><code>b101013</code></a>
- subquery edge cases <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3076">#3076</a>
by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/8c4400ba194661d1e1ee4aa4ea2649b2356a5f02"><code>8c4400b</code></a>
- <strong>bigquery</strong>: more table qualification edge cases closes
<a
href="https://redirect.github.com/tobymao/sqlglot/pull/3083">#3083</a>
<em>(commit by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/d898f559fac44789da08689e835619f978c05a3e"><code>d898f55</code></a>
- <strong>bigquery</strong>: even more edge cases <em>(commit by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/4fb74ff61effd9e5fa8593cdf1c9229d5106ab7e"><code>4fb74ff</code></a>
- dataframe optimize user input <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3092">#3092</a>
by <a
href="https://github.com/eakmanrq"><code>@​eakmanrq</code></a>)</em>
<ul>
<li>:arrow_lower_right: <em>fixes issue <a
href="https://redirect.github.com/tobymao/sqlglot/issues/3091">#3091</a>
opened by <a
href="https://github.com/alexdemeo"><code>@​alexdemeo</code></a></em></li>
</ul>
</li>
</ul>
<h3>:recycle: Refactors</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/cea7508c5f2b5838e889486d28df47ad9b263345"><code>cea7508</code></a>
- <strong>lineage</strong>: simplify <code>Node.walk()</code> <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3098">#3098</a>
by <a
href="https://github.com/rexledesma"><code>@​rexledesma</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/ebe5a462ed50711d6ded18b454c5294e487e323f"><code>ebe5a46</code></a>
- <strong>executor</strong>: simplify column type inference <em>(PR <a
href="https://redirect.github.com/tobymao/sqlglot/pull/3104">#3104</a>
by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em></li>
</ul>
<h3>:wrench: Chores</h3>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/6c67a2b0dbe2a66ea4ce2e008101f4cf41b1c517"><code>6c67a2b</code></a>
- reduce size of tpcds <em>(commit by <a
href="https://github.com/tobymao"><code>@​tobymao</code></a>)</em></li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/21e4fca2b744a22981d8ff1696986061d3344d40"><code>21e4fca</code></a>
- update dialect count in README to include Athena <em>(commit by <a
href="https://github.com/georgesittas"><code>@​georgesittas</code></a>)</em></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/tobymao/sqlglot/commit/fa84e2c2d9ae349033039ec649decc371561e421"><code>fa84e2c</code></a>
Fix: copy all arg keys, including those set to None (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3108">#3108</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/80b23201f9668a5845002c1c21b0a394003847f9"><code>80b2320</code></a>
feat: no recursion dfs (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3105">#3105</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/973285d9370081aa7b6259d901f8d31744a586a9"><code>973285d</code></a>
docs: update API docs, CHANGELOG.md for v22.3.0 [skip ci]</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/ebe5a462ed50711d6ded18b454c5294e487e323f"><code>ebe5a46</code></a>
Refactor(executor): simplify column type inference (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3104">#3104</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/18fd0794302a1ecaa91be9dfbc7feddd0b8a3b05"><code>18fd079</code></a>
feat: no recursion copy (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3103">#3103</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/a38db014cce8ada9554c205c879ae0c0dfda1b14"><code>a38db01</code></a>
feat: Generalizing CREATE SEQUENCE (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3090">#3090</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/8d5be0cf54e77000b220cfcca0edfdeb1759b70b"><code>8d5be0c</code></a>
Feat(duckdb): make ARRAY_TO_STRING transpilable to other dialects</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/ddab9dff663985d9473ce4b2dbe4fe266ae1bdf7"><code>ddab9df</code></a>
feat(duckdb): add support for exp.ArrayJoin (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3102">#3102</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/efee38858c4501ccace4b3eb3f066cb352f3ac60"><code>efee388</code></a>
feat: no more recursion for union generation (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3101">#3101</a>)</li>
<li><a
href="https://github.com/tobymao/sqlglot/commit/8a34fb433bc33551febe96665e16668de73e5bd6"><code>8a34fb4</code></a>
Refactor!(optimizer): only create scopes for the DDL queries (<a
href="https://redirect.github.com/tobymao/sqlglot/issues/3096">#3096</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tobymao/sqlglot/compare/v22.2.1...v22.3.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sqlglot&package-manager=pip&previous-version=22.2.1&new-version=22.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
sundarshankar89 added a commit to sundarshankar89/remorph that referenced this pull request Jan 3, 2025
* Added Pylint Checker
([databrickslabs#149](databrickslabs#149)). This
diff adds a Pylint checker to the project, which is used to enforce a
consistent code style, identify potential bugs, and check for errors in
the Python code. The configuration for Pylint includes various settings,
such as a line length limit, the maximum number of arguments for a
function, and the maximum number of lines in a module. Additionally,
several plugins have been specified to load, which add additional checks
and features to Pylint. The configuration also includes settings that
customize the behavior of Pylint's naming conventions checks and handle
various types of code constructs, such as exceptions, logging
statements, and import statements. By using Pylint, the project can help
ensure that its code is of high quality, easy to understand, and free of
bugs. This diff includes changes to various files, such as cli.py,
morph_status.py, validate.py, and several SQL-related files, to ensure
that they adhere to the desired Pylint configuration and best practices
for code quality and organization.
* Fixed edge case where column name is same as alias name
([databrickslabs#164](databrickslabs#164)). A recent
commit has introduced fixes for edge cases related to conflicts between
column names and alias names in SQL queries, addressing issues
[databrickslabs#164](databrickslabs#164) and
[databrickslabs#130](databrickslabs#130). The
`check_for_unsupported_lca` function has been updated with two helper
functions `_find_aliases_in_select` and `_find_invalid_lca_in_window` to
detect aliases with the same name as a column in a SELECT expression and
identify invalid Least Common Ancestors (LCAs) in window functions,
respectively. The `find_windows_in_select` function has been refactored
and renamed to `_find_windows_in_select` for improved code readability.
The `transpile` and `parse` functions in the `sql_transpiler.py` file
have been updated with try-except blocks to handle cases where a column
name matches the alias name, preventing errors or exceptions such as
`ParseError`, `TokenError`, and `UnsupportedError`. A new unit test,
"test_query_with_same_alias_and_column_name", has been added to verify
the fix, passing a SQL query with a subquery having a column alias
`ca_zip` which is also used as a column name in the same query,
confirming that the function correctly handles the scenario where a
column name conflicts with an alias name.
* `TO_NUMBER` without `format` edge case
([databrickslabs#172](databrickslabs#172)). The
`TO_NUMBER without format edge case` commit introduces changes to
address an unsupported usage of the `TO_NUMBER` function in Databicks
SQL dialect when the `format` parameter is not provided. The new
implementation introduces constants `PRECISION_CONST` and `SCALE_CONST`
(set to 38 and 0 respectively) as default values for `precision` and
`scale` parameters. These changes ensure Databricks SQL dialect
requirements are met by modifying the `_to_number` method to incorporate
these constants. An `UnsupportedError` will now be raised when
`TO_NUMBER` is called without a `format` parameter, improving error
handling and ensuring users are aware of the required `format`
parameter. Test cases have been added for `TO_DECIMAL`, `TO_NUMERIC`,
and `TO_NUMBER` functions with format strings, covering cases where the
format is taken from table columns. The commit also ensures that an
error is raised when `TO_DECIMAL` is called without a format parameter.

Dependency updates:

* Bump sqlglot from 21.2.1 to 22.0.1
([databrickslabs#152](databrickslabs#152)).
* Bump sqlglot from 22.0.1 to 22.1.1
([databrickslabs#159](databrickslabs#159)).
* Updated databricks-labs-blueprint[yaml] requirement from ~=0.2.3 to
>=0.2.3,<0.4.0
([databrickslabs#162](databrickslabs#162)).
* Bump sqlglot from 22.1.1 to 22.2.0
([databrickslabs#161](databrickslabs#161)).
* Bump sqlglot from 22.2.0 to 22.2.1
([databrickslabs#163](databrickslabs#163)).
* Updated databricks-sdk requirement from <0.21,>=0.18 to >=0.18,<0.22
([databrickslabs#168](databrickslabs#168)).
* Bump sqlglot from 22.2.1 to 22.3.1
([databrickslabs#170](databrickslabs#170)).
* Updated databricks-labs-blueprint[yaml] requirement from
<0.4.0,>=0.2.3 to >=0.2.3,<0.5.0
([databrickslabs#171](databrickslabs#171)).
* Bump sqlglot from 22.3.1 to 22.4.0
([databrickslabs#173](databrickslabs#173)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant