Skip to content

Commit 0a94377

Browse files
committed
set output schema when path is macro
1 parent e723684 commit 0a94377

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/io/cdap/plugin/spark/dynamic/BroadcastJoinConfig.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,9 @@ public List<DatasetJoinInfo> getDatasetsToJoin() {
279279
*/
280280
public boolean canCalculateOutputSchema() {
281281
for (int i = 0; i < numJoins; i++) {
282-
String pathName = getPropertyName("path", i);
283282
String schemaName = getPropertyName("datasetSchema", i);
284283
String joinOnName = getPropertyName("joinOn", i);
285-
if (containsMacro(pathName) || containsMacro(schemaName) || containsMacro(joinOnName)) {
284+
if (containsMacro(schemaName) || containsMacro(joinOnName)) {
286285
return false;
287286
}
288287
}
@@ -291,8 +290,9 @@ public boolean canCalculateOutputSchema() {
291290

292291
private DatasetJoinInfo getJoinInfo(int datasetNum) {
293292
Map<String, String> rawProperties = getProperties().getProperties();
294-
String path = rawProperties.get(getPropertyName("path", datasetNum));
295-
if (path == null) {
293+
String pathNameStr = getPropertyName("path", datasetNum);
294+
String path = rawProperties.get(pathNameStr);
295+
if (!containsMacro(pathNameStr) && path == null) {
296296
throw new IllegalArgumentException("Path for Dataset " + datasetNum + " must be specified.");
297297
}
298298

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy