You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2020/10/29 19:05:00 UTC
[jira] [Commented] (CALCITE-4362) Unable to parse queries that use
BigQuery pseudo columns _PARTITIONDATE/_PARTITIONTIME
[ https://issues.apache.org/jira/browse/CALCITE-4362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17223154#comment-17223154 ]
Julian Hyde commented on CALCITE-4362:
--------------------------------------
The solution is probably to make {{_PARTITIONDATE}} and {{_PARTITIONTIME}} into system columns. Specifically:
* When you ask a table 'Is {{_PARTITIONDATE}} one of your columns', the table will say 'yes'.
* When you ask a table 'tell me your columns' (e.g. when expanding '*') it will not mention {{_PARTITIONDATE}}.
Oracle's {{ROWID}} is similar.
> Unable to parse queries that use BigQuery pseudo columns _PARTITIONDATE/_PARTITIONTIME
> --------------------------------------------------------------------------------------
>
> Key: CALCITE-4362
> URL: https://issues.apache.org/jira/browse/CALCITE-4362
> Project: Calcite
> Issue Type: Bug
> Components: babel
> Reporter: Justin Swett
> Priority: Major
>
> BigQuery supports partitioned tables using pseudo columns "_PARTITIONDATE"
> e.g. The following table has two columns you can select from but also partitions the data by creation date
> {code:java}
> CREATE or REPLACE TABLE #{table} (
> transaction_id STRING,
> order_date DATE )
> PARTITION BY _PARTITIONDATE
> {code}
>
> The following queries cannot be validated
> {code:java}
> select * from #{table} where _PARTITIONDATE = '2020-11-03' ;
> -- OR
> select * from #{table} where _PARTITIONTIME = '2020-11-03' ;{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)