-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into tzhang-si-random
- Loading branch information
Showing
12 changed files
with
159 additions
and
54 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
60 changes: 60 additions & 0 deletions
60
src/main/java/net/snowflake/ingest/streaming/internal/ColumnProperties.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,60 @@ | ||
package net.snowflake.ingest.streaming.internal; | ||
|
||
/** | ||
* Class that encapsulates column properties. These are the same properties showed in the output of | ||
* <a href="https://docs.snowflake.com/en/sql-reference/sql/show-columns">SHOW COLUMNS</a>. Note | ||
* that this is slightly different than the internal column metadata used elsewhere in this SDK. | ||
*/ | ||
public class ColumnProperties { | ||
private String type; | ||
|
||
private String logicalType; | ||
|
||
private Integer precision; | ||
|
||
private Integer scale; | ||
|
||
private Integer byteLength; | ||
|
||
private Integer length; | ||
|
||
private boolean nullable; | ||
|
||
ColumnProperties(ColumnMetadata columnMetadata) { | ||
this.type = columnMetadata.getType(); | ||
this.logicalType = columnMetadata.getLogicalType(); | ||
this.precision = columnMetadata.getPrecision(); | ||
this.scale = columnMetadata.getScale(); | ||
this.byteLength = columnMetadata.getByteLength(); | ||
this.length = columnMetadata.getLength(); | ||
this.nullable = columnMetadata.getNullable(); | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public String getLogicalType() { | ||
return logicalType; | ||
} | ||
|
||
public Integer getPrecision() { | ||
return precision; | ||
} | ||
|
||
public Integer getScale() { | ||
return scale; | ||
} | ||
|
||
public Integer getByteLength() { | ||
return byteLength; | ||
} | ||
|
||
public Integer getLength() { | ||
return length; | ||
} | ||
|
||
public boolean isNullable() { | ||
return nullable; | ||
} | ||
} |
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
Oops, something went wrong.