-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#369 Type mapping documentation + refactoring #367
Conversation
Co-authored-by: Anastasiia Sergienko <46891819+AnastasiiaSergienko@users.noreply.github.com>
Co-authored-by: Anastasiia Sergienko <46891819+AnastasiiaSergienko@users.noreply.github.com>
doc/dialects/oracle.md
Outdated
| -------------------------------------------------------------------------------- | --------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| VARCHAR2(size) | ✓ | VARCHAR | | | ||
| NVARCHAR2(size) | ✓ | VARCHAR | | | ||
| NUMBER \[ (p \[, s\]) \] | ✓ | NUMBER or VARCHAR(2000000) | NUMBER with precision > 36 are casted to VARCHAR to prevent a loss of precision. [*](#Mapping-of-number-types) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the star lead somewhere? I can't click it.
src/main/java/com/exasol/adapter/dialects/oracle/OracleColumnMetadataReader.java
Outdated
Show resolved
Hide resolved
case INTERVAL_DAY_TO_SECOND: | ||
case ORACLE_BINARY_FLOAT: | ||
case ORACLE_BINARY_DOUBLE: | ||
case Types.ROWID: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the data mapping table, this data type is not supported. Check it in the test. If there is no test, create one. If it's not supported, remove it from here too
src/test/java/com/exasol/adapter/dialects/oracle/OracleSqlDialectIT.java
Outdated
Show resolved
Hide resolved
@@ -18,7 +19,7 @@ | |||
private boolean requiresSelectListAliasesForLimit = false; | |||
private static final String TIMESTAMP_FORMAT = "'YYYY-MM-DD HH24:MI:SS.FF3'"; | |||
private static final List<String> TYPE_NAMES_REQUIRING_CAST = List.of("TIMESTAMP", "INTERVAL", "BINARY_FLOAT", | |||
"BINARY_DOUBLE", "ROWID", "UROWID", "BLOB"); | |||
"BINARY_DOUBLE", "BLOB"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove also blob from here, we don't support it
@@ -273,8 +274,6 @@ private String getProjectionString(final SqlColumn column, final String projecti | |||
+ ")"; | |||
} else if (typeName.equals("NUMBER")) { | |||
return getNumberProjectionString(column, projectionString, (OracleSqlDialect) dialect); | |||
} else if (typeName.equals("ROWID") || typeName.equals("UROWID")) { | |||
return "ROWIDTOCHAR(" + projectionString + ")"; | |||
} else if (typeName.equals("BLOB")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And from here too
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
#369 Type mapping documentation
#370 Cleanup of oracle dialect