do not keep Mode from previous relation v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 23 May 2021 17:17:33 +0200
branchv_0
changeset 4 66c8a1783884
parent 3 9f2d6645ebe6
child 5 9ddc9462e25b
do not keep Mode from previous relation
src/InferTypesHandler.h
--- a/src/InferTypesHandler.h	Sun May 23 15:51:43 2021 +0200
+++ b/src/InferTypesHandler.h	Sun May 23 17:17:33 2021 +0200
@@ -71,6 +71,7 @@
 
 	void startRelation(string_t name, vector<AttributeMetadata> attributes) override {
 		// TODO: move this logic to relpipe-lib-infertypes and share with certain modules like relpipe-in-csv
+		currentMode.reset();
 		for (RelationConfiguration rc : configuration.relationConfigurations) {
 			if (std::regex_match(name, rc.relationPattern)) {
 				if (rc.mode == MODE::METADATA || rc.mode == MODE::AUTO && MetadataMode::willInfer(attributes)) currentMode.reset(new MetadataMode(relationalWriter));