Support verifying SELECT queries with DATE or UNKNOWN columns#14266
Support verifying SELECT queries with DATE or UNKNOWN columns#14266caithagoras merged 3 commits intoprestodb:masterfrom
Conversation
When executing a query with no result, an artificial QueryResult object is created but only its QueryStats are needed. Refactor JdbcPrestoAction to avoid this.
DATE or UNKNOWN columns1c90f30 to
136f4d0
Compare
|
@caithagoras What is UNKNOWN column and what are the queries that return no results? |
mbasmanova
left a comment
There was a problem hiding this comment.
@caithagoras Improve JdbcPrestoAction commit looks good, but would you given an example of query with no result?
mbasmanova
left a comment
There was a problem hiding this comment.
typos in the commit message; also, commit message explains how date columns are supported, but doesn't explain how other types (unknown) are supported. Also, what is "unknown" column type?
Support verifying SELECT queries with date columns
SELECT query is rewritten into CreateTableAsSelect so that results of control
and test queries can be saved into temporary tables before comparing the
checksums. However, certain columns types, such as date and unknown as well
as complex types (lists, maps and structs) containing those types cannot be written
into a Hive table.
Previously, SELECT queries that generate date columns were skipped
(the control query would fail). This change supports verifying those queries by
casting each date column into a timestamp column.
There was a problem hiding this comment.
This logic is Hive-specific. Does Verifier support only Hive connector?
There was a problem hiding this comment.
This is the assumption so far. Verifier are unaware about what connector is associated with a given catalog, so it won't be able make decisions around that as well.
mbasmanova
left a comment
There was a problem hiding this comment.
@caithagoras I believe same problem applies to Geometry type. CC: @jagill
|
@mbasmanova A Presto Although being able to verify In additional to supporting |
|
@caithagoras Thanks for explaining. I understand now what is top-level UNKNOWN column, but I'm still puzzled at how list, map, struct may include a field of type UNKNOWN. Would you clarify? |
|
@mbasmanova This is similar with structured type. If array elements are statically |
|
@caithagoras Thank you so much for clarifying. |
|
@mbasmanova Regd When we run a Presto query using jdbc, Maybe "no result" is not a good wording, as "ignore result" is closer to what is done there. We do not need results from setup, main, and teardown queries, and we do need results from rewrite, desc, and checksum queries, etc. |
SELECT query is rewritten into CreateTableAsSelect so that results of control and test queries can be saved into temporary tables before comparing the checksums. However, certain columns types, such as DATE and UNKNOWN as well as complex types (lists, maps and rows) containing those types cannot be written into a Hive table. Previously, SELECT queries that generate DATE columns were skipped (the control query would fail). This change supports verifying those queries by casting each DATE column into a TIMESTAMP column.
Previously, SELECT queries that generate UNKNOWN columns were skipped (the control query would fail). This change supports verifying those queries by casting each UNKNOWN column into a BIGINT column.
Uh oh!
There was an error while loading. Please reload this page.