Skip to content

Commit

Permalink
Fix invalid test cases in test_reduce_describe_query (#2495)
Browse files Browse the repository at this point in the history
<!---
Please answer these questions before creating your pull request. Thanks!
--->

1. Which Jira issue is this PR addressing? Make sure that there is an
accompanying issue to your PR.

   <!---
   In this section, please add a Snowflake Jira issue number.

Note that if a corresponding GitHub issue exists, you should still
include
   the Snowflake Jira issue number. For example, for GitHub issue
#1400, you should
   add "SNOW-1335071" here.
    --->

   Fixes SNOW-NNNNNNN

2. Fill out the following pre-review checklist:

- [ ] I am adding a new automated test(s) to verify correctness of my
new code
- [ ] If this test skips Local Testing mode, I'm requesting review from
@snowflakedb/local-testing
   - [ ] I am adding new logging messages
   - [ ] I am adding a new telemetry message
   - [ ] I am adding new credentials
   - [ ] I am adding a new dependency
- [ ] If this is a new feature/behavior, I'm adding the Local Testing
parity changes.
- [x] I acknowledge that I have ensured my changes to be thread-safe.
Follow the link for more information: [Thread-safe Developer
Guidelines](https://docs.google.com/document/d/162d_i4zZ2AfcGRXojj0jByt8EUq-DrSHPPnTa4QvwbA/edit#bookmark=id.e82u4nekq80k)

3. Please describe how your code solves the related issue.

There are some invalid test cases causing failure when sql simplifier is
disabled
  • Loading branch information
sfc-gh-jdu authored Oct 23, 2024
1 parent 37fe603 commit cd8f160
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/integ/test_reduce_describe_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def setup(request, session):
# Create from SQL
create_from_sql_funcs = [
lambda session: session.sql("SELECT 1 AS a, 2 AS b"),
lambda session: session.sql("SELECT 1 AS a, 2 AS b").select("b"),
lambda session: session.sql("SELECT 1 AS a, 2 AS b").select("a"),
lambda session: session.sql("SELECT 1 AS a, 2 AS b").select(
"a", lit("2").alias("c")
),
Expand All @@ -47,7 +47,7 @@ def setup(request, session):
lambda session: session.create_dataframe([[1, 2], [3, 4]], schema=["a", "b"]),
lambda session: session.create_dataframe(
[[1, 2], [3, 4]], schema=["a", "b"]
).select("b"),
).select("a"),
lambda session: session.create_dataframe(
[[1, 2], [3, 4]], schema=["a", "b"]
).select("a", lit("2").alias("c")),
Expand All @@ -60,7 +60,7 @@ def setup(request, session):
).cache_result(),
lambda session: session.create_dataframe([[1, 2], [3, 4]], schema=["a", "b"])
.cache_result()
.select("b"),
.select("a"),
lambda session: session.create_dataframe([[1, 2], [3, 4]], schema=["a", "b"])
.cache_result()
.select("a", lit("2").alias("c")),
Expand All @@ -72,7 +72,7 @@ def setup(request, session):
.group_by("a")
.count(),
lambda session: session.create_dataframe([[1, 2], [3, 4]], schema=["a", "b"]).join(
session.sql("SELECT 1 AS a, 2 AS b")
session.sql("SELECT 1 AS a, 2 AS b1"), "a"
),
lambda session: session.create_dataframe(
[[1, 2], [3, 4]], schema=["a", "b"]
Expand Down Expand Up @@ -100,7 +100,7 @@ def setup(request, session):
),
lambda session: session.sql("SELECT 1 AS a, 2 AS b")
.union(session.sql("SELECT 3 AS a, 4 AS b"))
.select("b"),
.select("a"),
lambda session: session.sql("SELECT 1 AS a, 2 AS b")
.union(session.sql("SELECT 3 AS a, 4 AS b"))
.select("a", lit("2").alias("c")),
Expand Down

0 comments on commit cd8f160

Please sign in to comment.