Skip to content

IGNITE-29034 SQL Calcite: Add support for FROM DUAL queries - #13545

Open
tkalkirill wants to merge 1 commit into
masterfrom
ignite-29034
Open

IGNITE-29034 SQL Calcite: Add support for FROM DUAL queries#13545
tkalkirill wants to merge 1 commit into
masterfrom
ignite-29034

Conversation

@tkalkirill

Copy link
Copy Markdown
Contributor

if (frameworkCfg != null && frameworkCfg.getParserConfig().conformance().isSupportedDualTable()
&& schema.tables().get(DUAL_TBL_NAME) == null
&& schema.getFunctions(DUAL_TBL_NAME).stream().noneMatch(TableMacro.class::isInstance)) {
schema.add(DUAL_TBL_NAME, new ViewTableMacroImpl(DUAL_TBL_VIEW, schema, frameworkCfg));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure whether we really need this, but Calcite supports this property. If we decide to support it, let’s implement it the same way as Calcite does, because its implementation also works with grammars that do not allow SELECT without a FROM clause.
VALUES ('X')


/** */
private static void registerDualTableIfSupported(SchemaPlus schema, FrameworkConfig frameworkCfg) {
if (frameworkCfg != null && frameworkCfg.getParserConfig().conformance().isSupportedDualTable()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be more appropriate to use the validator conformance here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants