Skip to content

Spark schema <-> odcs conversion - #1

Open
rajatgl17 wants to merge 1 commit into
mainfrom
feature/spark-schema
Open

Spark schema <-> odcs conversion#1
rajatgl17 wants to merge 1 commit into
mainfrom
feature/spark-schema

Conversation

@rajatgl17

Copy link
Copy Markdown
Member

No description provided.

@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

DataType dataType = field.dataType();

// Map via metadata / type
if (dataType instanceof MapType mapType
String trimmed = physicalType.trim();
Matcher m = DECIMAL.matcher(trimmed);
if (m.matches()) {
return Optional.of(new DecimalSpec(Integer.parseInt(m.group(1)), Integer.parseInt(m.group(2))));
String trimmed = physicalType.trim();
Matcher m = DECIMAL.matcher(trimmed);
if (m.matches()) {
return Optional.of(new DecimalSpec(Integer.parseInt(m.group(1)), Integer.parseInt(m.group(2))));
}
Matcher m = VARCHAR.matcher(physicalType.trim());
if (m.matches()) {
return Optional.of(Integer.parseInt(m.group(1)));
return parent + "." + name;
}

private void failOrWarn(String path, String message, DataType fallback) {
private OdcsMetadata() {
}

public static Metadata build(SchemaProperty property, String sparkFieldName, boolean usedPhysicalName) {
report.warn(path, message + "; falling back to " + fallback.simpleString());
}

private void failOrWarn(String path, String message, StructType fallback) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant