-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[HUDI-8784] Validate auto key gen for SQL #12520
[HUDI-8784] Validate auto key gen for SQL #12520
Conversation
a55cfba
to
8662147
Compare
@Test | ||
def testAutoKeyGen(): Unit = { | ||
// No record key is set, which should trigger auto key gen. | ||
// MOR table is used to generate log files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cow table is the default table type, and the default operation type is upsert
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have set it to MOR table, since it is more complex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danny0405 , do you mean I should use COW?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can just test both table types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
val expectedDf = spark.createDataFrame(expected).toDF(columns: _*) | ||
val expectedMinusActual = expectedDf.except(actualDf) | ||
val actualMinusExpected = actualDf.except(expectedDf) | ||
expectedMinusActual.show(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove since this is for debug.
8662147
to
0e36f6f
Compare
0e36f6f
to
798bd35
Compare
Change Logs
To confirm if the auto key gen works well for Spark SQL.
Impact
Better reliability.
Risk level (write none, low medium or high below)
Low.
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist