maropu commented on issue #25190: [SPARK-28429][SQL] Support implicit cast string type to interval type in PromoteStrings URL: https://github.com/apache/spark/pull/25190#issuecomment-513100522 In postgresql, is this handled as implicit casts? I checked a cast list in postgresql though, I couldn't find an entry, text -> interval, for implicit casts; ``` postgres=# \dC text List of casts Source type | Target type | Function | Implicit? -------------------+-------------------+--------------------+--------------- "char" | text | text | yes boolean | text | text | in assignment character | text | text | yes character varying | text | (binary coercible) | yes cidr | text | text | in assignment inet | text | text | in assignment name | text | text | yes pg_dependencies | text | (with inout) | yes pg_ndistinct | text | (with inout) | yes pg_node_tree | text | (binary coercible) | yes text | "char" | char | in assignment text | character | (binary coercible) | yes text | character varying | (binary coercible) | yes text | name | name | yes text | regclass | regclass | yes text | xml | xml | no xml | text | (binary coercible) | in assignment (17 rows) ``` In postgresql, it seems `select now() + '100 days'` is hanldes as `select now() + interval '100 days'` in the parser? (I'm not 100% sure though)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
