Skip to content

Commit

Permalink
test(flink): edit basic join to test mutating join
Browse files Browse the repository at this point in the history
  • Loading branch information
deepyaman authored and jcrist committed Jun 26, 2023
1 parent 6cb4d9b commit 83fe5c3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
WITH t0 AS (
SELECT t3.*
FROM awards_players t3
WHERE t3.`lgID` = 'NL'
),
t1 AS (
SELECT t0.`playerID`, t0.`awardID`, t0.`tie`, t0.`notes`
FROM t0
),
t2 AS (
SELECT t3.*
FROM batting t3
WHERE t3.`yearID` = 2015
)
SELECT t2.`playerID`, t2.`yearID`, t2.`stint`, t2.`teamID`, t2.`lgID`, t2.`G`,
t2.`AB`, t2.`R`, t2.`H`, t2.`X2B`, t2.`X3B`, t2.`HR`, t2.`RBI`,
t2.`SB`, t2.`CS`, t2.`BB`, t2.`SO`, t2.`IBB`, t2.`HBP`, t2.`SH`,
t2.`SF`, t2.`GIDP`, t1.`awardID`, t1.`tie`, t1.`notes`
FROM t2
INNER JOIN t1
ON t2.`playerID` = t1.`playerID`
6 changes: 3 additions & 3 deletions ibis/backends/flink/tests/test_join.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from ibis.backends.flink.compiler.core import translate


def test_join(batting, awards_players, snapshot):
left = batting
right = awards_players
def test_mutating_join(batting, awards_players, snapshot):
left = batting[batting.yearID == 2015]
right = awards_players[awards_players.lgID == 'NL'].drop('yearID', 'lgID')

predicate = ['playerID']

Expand Down

0 comments on commit 83fe5c3

Please sign in to comment.