Skip to content

Commit

Permalink
style: apply automatic fixes of linters
Browse files Browse the repository at this point in the history
  • Loading branch information
MShahzaib authored and github-actions[bot] committed Jun 23, 2022
1 parent a6ec2b8 commit 1650310
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ class SafeDSFormatter : AbstractFormatter2() {
}
}

/**********************************************************************************************************
/**********************************************************************************************************
* Schema
**********************************************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ import org.eclipse.emf.ecore.EObject
import org.eclipse.xtext.naming.QualifiedName
import tech.tablesaw.api.Table


fun inferSchema(context: EObject, name: String, path: String): SdsSchema? {
try {
var colList: List<SdsColumn> = emptyList()

val table = Table.read().csv(path);
val table = Table.read().csv(path)

for (row in table.structure()) {
val colName = row.getString(1)
Expand All @@ -32,14 +31,14 @@ fun inferSchema(context: EObject, name: String, path: String): SdsSchema? {

val stdlibClass = context.getStdlibClassOrNull(colQualifiedName) ?: return null

colList+= createSdsColumn(
colList += createSdsColumn(
createSdsString(colName),
createSdsNamedType(stdlibClass, isNullable = true)
)
}

return createSdsSchema(name, columns = colList)
} catch (e : Exception){
} catch (e: Exception) {
return null
}
}
}

0 comments on commit 1650310

Please sign in to comment.