Skip to content

Commit

Permalink
debug github build
Browse files Browse the repository at this point in the history
  • Loading branch information
yliuuuu committed Nov 3, 2023
1 parent adabc20 commit 2d22b04
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import org.partiql.types.StaticType.Companion.STRING
import org.partiql.types.StaticType.Companion.unionOf
import org.partiql.types.StructType
import org.partiql.types.TupleConstraint
import java.nio.file.FileSystemNotFoundException
import java.time.Instant
import java.util.stream.Stream
import kotlin.io.path.pathString
Expand Down Expand Up @@ -132,7 +133,16 @@ class PartiQLSchemaInferencerTests {

companion object {

private val root = this::class.java.classLoader.getResource("/catalogs/default")!!.toURI().toPath().pathString
private val root = try {
this::class.java.getResource("/catalogs/default")!!.toURI().toPath().pathString
} catch (ex: FileSystemNotFoundException) {
val URL = try { this::class.java.getResource("/catalogs/default")!! } catch (e: Exception) { null }
val URI = try { URL?.toURI() } catch (e: Exception) { null }
val path = try { URI?.toPath() } catch (e: Exception) { null }
val fileSystem = try { path?.fileSystem.toString() } catch (e: Exception) { null }
val string = try { path?.pathString } catch (e: Exception) { null }
throw InternalError("URL : $URL, URI: $URI, path: $path, fileStytme: $fileSystem, pathString: $string")
}

private val PLUGINS = listOf(LocalPlugin())

Expand Down

0 comments on commit 2d22b04

Please sign in to comment.