-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30f6918
commit d69c491
Showing
8 changed files
with
64 additions
and
4 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
17 changes: 17 additions & 0 deletions
17
...flake/kafka/connector/internal/streaming/schemaevolution/iceberg/IcebergColumnSchema.java
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,17 @@ | ||
package com.snowflake.kafka.connector.internal.streaming.schemaevolution.iceberg; | ||
|
||
import net.snowflake.ingest.internal.apache.iceberg.types.Types; | ||
|
||
/** Wrapper class for Iceberg schema retrieved from channel */ | ||
public class IcebergColumnSchema { | ||
|
||
private final Types schema; | ||
|
||
public IcebergColumnSchema(Types schema) { | ||
this.schema = schema; | ||
} | ||
|
||
public Types getSchema() { | ||
return schema; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...owflake/kafka/connector/internal/streaming/schemaevolution/iceberg/IcebergColumnTree.java
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,7 @@ | ||
package com.snowflake.kafka.connector.internal.streaming.schemaevolution.iceberg; | ||
|
||
/** Class with object types compatible with Snowflake Iceberg table */ | ||
public class IcebergColumnTree { | ||
|
||
|
||
} |
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
16 changes: 16 additions & 0 deletions
16
...com/snowflake/kafka/connector/internal/streaming/schemaevolution/iceberg/IcebergNode.java
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,16 @@ | ||
package com.snowflake.kafka.connector.internal.streaming.schemaevolution.iceberg; | ||
|
||
import net.snowflake.ingest.internal.apache.iceberg.types.Types; | ||
|
||
public class IcebergNode { | ||
|
||
public String name; | ||
// todo should be snowflake iceberg table types | ||
public Types dataType; | ||
// todo add is nullable field | ||
|
||
public IcebergNode(String name, Types dataType) { | ||
this.name = name; | ||
this.dataType = dataType; | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
src/test/java/com/snowflake/kafka/connector/streaming/iceberg/TreeTest.java
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,16 @@ | ||
package com.snowflake.kafka.connector.streaming.iceberg; | ||
|
||
import net.snowflake.ingest.internal.apache.iceberg.types.Type; | ||
import net.snowflake.ingest.utils.IcebergDataTypeParser; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TreeTest { | ||
|
||
@Test | ||
void testParsing() { | ||
String plainIcebergSchema = "{\"type\":\"struct\",\"fields\":[{\"id\":23,\"name\":\"k1\",\"required\":false,\"type\":\"int\"},{\"id\":24,\"name\":\"k2\",\"required\":false,\"type\":\"int\"}]}"; | ||
Type typ = IcebergDataTypeParser.deserializeIcebergType(plainIcebergSchema); | ||
|
||
System.out.println("stop debugger"); | ||
} | ||
} |