-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0c99dd
commit 805b5e6
Showing
5 changed files
with
189 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style type="text/css"> | ||
body {background-color: black;} | ||
pre { | ||
font-weight: normal; | ||
color: #bbb; | ||
white-space: -moz-pre-wrap; | ||
white-space: -o-pre-wrap; | ||
white-space: -pre-wrap; | ||
white-space: pre-wrap; | ||
word-wrap: break-word; | ||
overflow-wrap: break-word; | ||
} | ||
b {font-weight: normal} | ||
b.BOLD {color: #fff} | ||
b.ITA {font-style: italic} | ||
b.UND {text-decoration: underline} | ||
b.STR {text-decoration: line-through} | ||
b.UNDSTR {text-decoration: underline line-through} | ||
b.BLK {color: #000000} | ||
b.RED {color: #aa0000} | ||
b.GRN {color: #00aa00} | ||
b.YEL {color: #aa5500} | ||
b.BLU {color: #0000aa} | ||
b.MAG {color: #aa00aa} | ||
b.CYN {color: #00aaaa} | ||
b.WHI {color: #aaaaaa} | ||
b.HIK {color: #555555} | ||
b.HIR {color: #ff5555} | ||
b.HIG {color: #55ff55} | ||
b.HIY {color: #ffff55} | ||
b.HIB {color: #5555ff} | ||
b.HIM {color: #ff55ff} | ||
b.HIC {color: #55ffff} | ||
b.HIW {color: #ffffff} | ||
b.BBLK {background-color: #000000} | ||
b.BRED {background-color: #aa0000} | ||
b.BGRN {background-color: #00aa00} | ||
b.BYEL {background-color: #aa5500} | ||
b.BBLU {background-color: #0000aa} | ||
b.BMAG {background-color: #aa00aa} | ||
b.BCYN {background-color: #00aaaa} | ||
b.BWHI {background-color: #aaaaaa} | ||
</style> | ||
</head> | ||
<body> | ||
<pre>DeltaLakeCRUDSpec: | ||
A Delta table | ||
- should be created and populated | ||
+ Given a table created with SQL | ||
<b class=YEL>CREATE TABLE DeltaLakeCRUDSpec ( | ||
id int, | ||
label String, | ||
partitionKey long, | ||
date Date, | ||
timestamp Timestamp | ||
) USING DELTA</b> | ||
+ When we write 20 rows to DeltaLakeCRUDSpec | ||
+ Then the table indeed contains all the data | ||
+ And the metastore contains a reference to the table DeltaLakeCRUDSpec | ||
+ <b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b> | ||
- should support updates with 'update DeltaLakeCRUDSpec set label='ipse locum'' | ||
+ Given SQL | ||
<b class=YEL>update | ||
DeltaLakeCRUDSpec | ||
set | ||
label = 'ipse locum'</b> | ||
+ When we execute it | ||
+ Then all rows are updated | ||
+ And look like: | ||
<b class=YEL>Datum(10,ipse locum,0,2023-11-29,2023-12-09 10:26:21.581) | ||
</b><b class=MAG>Datum(11,ipse locum,1,2023-11-28,2023-12-09 10:26:21.781) | ||
</b><b class=YEL>Datum(12,ipse locum,2,2023-11-27,2023-12-09 10:26:21.981) | ||
</b>... | ||
+ <b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b> | ||
- should be able to have its schema updated | ||
+ Given SQL | ||
<b class=YEL>ALTER TABLE | ||
DeltaLakeCRUDSpec | ||
ADD | ||
COLUMNS (new_string string comment 'new_string docs')</b> | ||
+ When we execute it | ||
+ Then all rows are updated | ||
+ And look like: | ||
<b class=YEL>[10,ipse locum,0,2023-11-29,2023-12-09 10:26:21.581,null] | ||
</b><b class=MAG>[11,ipse locum,1,2023-11-28,2023-12-09 10:26:21.781,null] | ||
</b><b class=YEL>[12,ipse locum,2,2023-11-27,2023-12-09 10:26:21.981,null] | ||
</b>... | ||
+ <b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b> | ||
+ <b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b> | ||
Run completed in 48 seconds, 54 milliseconds. | ||
Total number of tests run: 7 | ||
Suites: completed 4, aborted 0 | ||
Tests: succeeded 7, failed 0, canceled 0, ignored 0, pending 0 | ||
All tests passed.</pre> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style type="text/css"> | ||
body {background-color: black;} | ||
pre { | ||
font-weight: normal; | ||
color: #bbb; | ||
white-space: -moz-pre-wrap; | ||
white-space: -o-pre-wrap; | ||
white-space: -pre-wrap; | ||
white-space: pre-wrap; | ||
word-wrap: break-word; | ||
overflow-wrap: break-word; | ||
} | ||
b {font-weight: normal} | ||
b.BOLD {color: #fff} | ||
b.ITA {font-style: italic} | ||
b.UND {text-decoration: underline} | ||
b.STR {text-decoration: line-through} | ||
b.UNDSTR {text-decoration: underline line-through} | ||
b.BLK {color: #000000} | ||
b.RED {color: #aa0000} | ||
b.GRN {color: #00aa00} | ||
b.YEL {color: #aa5500} | ||
b.BLU {color: #0000aa} | ||
b.MAG {color: #aa00aa} | ||
b.CYN {color: #00aaaa} | ||
b.WHI {color: #aaaaaa} | ||
b.HIK {color: #555555} | ||
b.HIR {color: #ff5555} | ||
b.HIG {color: #55ff55} | ||
b.HIY {color: #ffff55} | ||
b.HIB {color: #5555ff} | ||
b.HIM {color: #ff55ff} | ||
b.HIC {color: #55ffff} | ||
b.HIW {color: #ffffff} | ||
b.BBLK {background-color: #000000} | ||
b.BRED {background-color: #aa0000} | ||
b.BGRN {background-color: #00aa00} | ||
b.BYEL {background-color: #aa5500} | ||
b.BBLU {background-color: #0000aa} | ||
b.BMAG {background-color: #aa00aa} | ||
b.BCYN {background-color: #00aaaa} | ||
b.BWHI {background-color: #aaaaaa} | ||
</style> | ||
</head> | ||
<body> | ||
<pre>MergingDataSpec: | ||
Data | ||
- should be merged | ||
+ Given a table with 20 rows | ||
+ When we use 'replaceWhere' to write those partitions where partitionKey = 0 | ||
+ Then the partition IDs that are not 0 will not change but partition 0 will have the new rows | ||
+ <b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b> | ||
+ <b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b><b class=WHI>+ </b><b class=CYN>+ </b><b class=BLU>+ </b><b class=RED>+ </b><b class=GRN>+ </b><b class=MAG>+ </b><b class=YEL>+ </b> </pre> | ||
</body> | ||
</html> |
Oops, something went wrong.