-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' into counts-popover
- Loading branch information
Showing
25 changed files
with
472 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
.../base-tests/src/test/resources/META-INF/services/org.apache.flink.table.factories.Factory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pl.touk.nussknacker.engine.flink.table.definition.MockableCatalogFactory |
30 changes: 30 additions & 0 deletions
30
...test/scala/pl/touk/nussknacker/engine/flink/table/definition/MockableCatalogFactory.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package pl.touk.nussknacker.engine.flink.table.definition | ||
|
||
import org.apache.flink.table.catalog.{Catalog, GenericInMemoryCatalog} | ||
import org.apache.flink.table.factories.CatalogFactory | ||
|
||
class MockableCatalogFactory extends CatalogFactory { | ||
|
||
override def factoryIdentifier(): String = MockableCatalogFactory.catalogName | ||
|
||
override def createCatalog(context: CatalogFactory.Context): Catalog = MockableCatalogFactory.catalog | ||
|
||
} | ||
|
||
// Warning: this implementation can't be used by concurrent threads | ||
object MockableCatalogFactory { | ||
|
||
private val catalogName = "mockable" | ||
|
||
@volatile | ||
var catalog: GenericInMemoryCatalog = createCatalog | ||
|
||
private def createCatalog = { | ||
new GenericInMemoryCatalog(catalogName) | ||
} | ||
|
||
def resetCatalog(): Unit = { | ||
catalog = createCatalog | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...ble/extractor/SqlFromFileReaderTest.scala → ...le/definition/SqlFromFileReaderTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.