[
https://issues.apache.org/jira/browse/CALCITE-4362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631304#comment-17631304
]
Julian Hyde commented on CALCITE-4362:
--------------------------------------
I haven't read the rough draft, but critiquing the above as a design proposal,
the approach seems sound. {{isSystemField}} and {{getRowTypeSansSystemColumns}}
are not stubs exactly, but vestiges of a previous system that had this
functionality. Reviving them for this purpose is perfect.
I like how {{SystemColumns}} takes a {{RelDataTypeFactory}} as an argument, to
deal with the short lifecycle of types.
A few minor concerns/questions:
* I don't like {{SystemColumns}} as an interface name. It's plural, and
therefore how do you name collections of SystemColumnses?!
* SystemColumns would seem more natural in {{RelDataTypeSystem}} than
{{Conformance}} (yeah, it's a bit difficult to override type system, but see
what I did in CALCITE-5155)
* Are there ever cases where some tables would have system columns and others
would not? E.g. Oracle tables have a {{ROWID}} but views do not. If so, would
we be able to extend this proposal to cover this? (It's not a deal breaker if
not. Just want to see if there's room to evolve.)
* Would you ever want queries to have a system column? E.g. In SQLstream each
table has a {{ROWTIME}} column, but also every query, including a query that is
a join between two tables, has one {{ROWTIME}} column. Again, not a deal
breaker.
> 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
> Assignee: Julian Hyde
> 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.20.10#820010)