the-other-tim-brown commented on code in PR #18042:
URL: https://github.com/apache/hudi/pull/18042#discussion_r2747835994
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestLanceDataSource.scala:
##########
@@ -659,6 +663,60 @@ class TestLanceDataSource extends
HoodieSparkClientTestBase {
assertTrue(actual.except(expectedDf).isEmpty)
}
+ @ParameterizedTest
+ @EnumSource(value = classOf[HoodieTableType])
+ def testUpsertWithPopulateMetaFieldsDisabled(tableType: HoodieTableType):
Unit = {
+ val tableName = s"test_lance_no_meta_${tableType.name().toLowerCase}"
+ val tablePath = s"$basePath/$tableName"
+
+ val records1 = Seq(
+ (101, "Alice", 30, 95.5, "dept=engineering"),
Review Comment:
The formatting may get confusing here if hive style partitioning gets
enabled. It will be more clear to have the column just named `dept` or
`department`
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/common/SparkReaderContextFactory.java:
##########
@@ -96,7 +96,12 @@ public SparkReaderContextFactory(HoodieSparkEngineContext
hoodieSparkEngineConte
if (metaClient.getTableConfig().isMultipleBaseFileFormatsEnabled()) {
SparkColumnarFileReader parquetFileReader =
sparkAdapter.createParquetFileReader(false, sqlConf, options, configs);
SparkColumnarFileReader orcFileReader = getOrcFileReader(resolver,
sqlConf, options, configs, sparkAdapter);
- baseFileReaderBroadcast = jsc.broadcast(new
MultipleColumnarFileFormatReader(parquetFileReader, orcFileReader));
+ if (HoodieSparkUtils.gteqSpark3_4()) {
Review Comment:
This logic is repeated in a lot of places now. Can we simplify this by
returning an `Option` from `createLanceFileReader` and then call `orElse(null)`
for these cases?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]