[Git][java-team/eigenbase-farrago][master] 6 commits: Import Debian changes 0.9.0-2.1
Andreas Tille (@tille)
gitlab at salsa.debian.org
Fri Aug 22 22:38:20 BST 2025
Andreas Tille pushed to branch master at Debian Java Maintainers / eigenbase-farrago
Commits:
dfdc6a23 by Holger Levsen at 2025-08-22T23:27:43+02:00
Import Debian changes 0.9.0-2.1
eigenbase-farrago (0.9.0-2.1) unstable; urgency=medium
.
* Non maintainer upload by the Reproducible Builds team.
* No source change upload to rebuild on buildd with .buildinfo files.
- - - - -
30d7d2e8 by Marcos Talau at 2025-08-22T23:27:43+02:00
Import Debian changes 0.9.0-3
eigenbase-farrago (0.9.0-3) unstable; urgency=medium
.
* QA upload.
* Set maintainer to Debian QA Group <packages at qa.debian.org>. (see: #889328)
- - - - -
fd50d004 by Andreas Tille at 2025-08-22T23:33:30+02:00
* Vcs-fields:
- Fix cut-n-pasto
- Point to Salsa
- - - - -
3ebf98de by Andreas Tille at 2025-08-22T23:36:22+02:00
* d/watch:
- version=4
- secure URI
- uversionmangle
* d/copyright:
- secure URIs
- Files-Excluded
* Drop manual scripts to exclude files
- - - - -
3d7f079b by Andreas Tille at 2025-08-22T23:37:16+02:00
New upstream version 0.9.0+dfsg
- - - - -
0fd7c6b7 by Andreas Tille at 2025-08-22T23:37:20+02:00
Update upstream source from tag 'upstream/0.9.0+dfsg'
Update to upstream version '0.9.0+dfsg'
with Debian dir 6da171c24fd9f18774270c14abce5c7fc1ffb861
- - - - -
27 changed files:
- + debian/build.xml
- + debian/changelog
- + debian/compat
- + debian/control
- + debian/copyright
- + debian/libeigenbase-farrago-java.poms
- + debian/patches/javadoc_links.diff
- + debian/patches/properties_java5_api.diff
- + debian/patches/series
- + debian/pom.xml
- + debian/rules
- + debian/source/format
- + debian/watch
- + examples/miniplan/unitsql/miniplan.ref
- + examples/miniplan/unitsql/miniplan.sql
- + examples/rng/unitsql/createPreUpgrade.ref
- + examples/rng/unitsql/createPreUpgrade.sql
- + examples/rng/unitsql/installPlugin.ref
- + examples/rng/unitsql/installPlugin.sql
- + examples/rng/unitsql/testPlugin.ref
- + examples/rng/unitsql/testPlugin.sql
- + examples/rng/unitsql/verifyReplaceCatalog.ref
- + examples/rng/unitsql/verifyReplaceCatalog.sql
- + ext/mql/unitsql/connected.ref
- + ext/mql/unitsql/connected.sql
- + ext/mql/unitsql/disconnected.ref
- + ext/mql/unitsql/disconnected.sql
Changes:
=====================================
debian/build.xml
=====================================
@@ -0,0 +1,108 @@
+<?xml version="1.0"?>
+<project name="eigenbase-farrago" default="jar" basedir="..">
+
+<target name="init">
+ <property name="src.dir" value="src"/>
+ <property name="build.dir" value="build"/>
+ <property name="jar" value="${build.dir}/eigenbase-properties.jar"/>
+
+ <mkdir dir="${build.dir}"/>
+
+ <path id="farrago.run.classpath">
+ <pathelement location="/usr/share/java/eigenbase-resgen.jar"/>
+ <pathelement location="/usr/share/java/eigenbase-xom.jar"/>
+ <pathelement location="${build.dir}"/>
+ </path>
+ <property name="farrago.run.classpath" refid="farrago.run.classpath"/>
+ <echo message="${farrago.run.classpath}"/>
+</target>
+
+<target name="define-tasks" depends="init">
+ <taskdef name="resgen" classname="org.eigenbase.resgen.ResourceGenTask">
+ <classpath refid="farrago.run.classpath"/>
+ </taskdef>
+</target>
+
+<target name="clean" depends="init">
+ <delete dir="${build.dir}"/>
+</target>
+
+<target name="generate-res" depends="define-tasks">
+ <!-- Exception classes need to exist for reflection -->
+ <javac
+ srcdir="${src.dir}"
+ destdir="${build.dir}"
+ source="1.4" target="1.4"
+ debug="on" nowarn="on" deprecation="off">
+ <include name="**/EigenbaseException.java" />
+ <include name="**/EigenbaseContextException.java" />
+ <include name="**/EigenbaseFeatureException.java" />
+ <include name="**/SqlValidatorException.java" />
+ </javac>
+ <resgen
+ srcdir="${src.dir}"
+ destdir="${src.dir}"
+ resdir="${build.dir}"
+ style="functor"
+ locales="en_US">
+ <include name="net/sf/farrago/resource/FarragoResource.xml"/>
+ </resgen>
+ <resgen
+ srcdir="${src.dir}"
+ destdir="${src.dir}"
+ resdir="${build.dir}"
+ style="functor"
+ locales="en_US">
+ <include name="net/sf/farrago/resource/FarragoInternalQuery.xml"/>
+ </resgen>
+ <resgen
+ srcdir="${src.dir}"
+ destdir="${src.dir}"
+ resdir="${build.dir}"
+ style="functor"
+ locales="en_US">
+ <include name="org/eigenbase/resource/EigenbaseResource.xml"/>
+ </resgen>
+</target>
+
+<target name="compile" depends="generate-res">
+ <copy file="jdbc4/Unwrappable14.java"
+ tofile="src/org/eigenbase/jdbc4/Unwrappable.java"/>
+ <copy file="jdbc4/UnwrappableRJConnection14.java"
+ tofile="src/org/eigenbase/jdbc4/UnwrappableRJConnection.java"/>
+
+ <javac srcdir="${src.dir}"
+ destdir="${build.dir}"
+ source="1.5" target="1.5"
+ debug="on" nowarn="on" deprecation="off">
+ <include name="org/eigenbase/util14/**/*.java" />
+ <include name="org/eigenbase/util/property/**/*.java" />
+ <classpath refid="farrago.run.classpath"/>
+ </javac>
+
+ <copy todir="src/org/eigenbase/jdbc4/">
+ <fileset dir="jdbc4" includes="*.java"
+ excludes="Unwrappable*.java"/>
+ </copy>
+<!--
+ <javac srcdir="${src.dir}"
+ destdir="${build.dir}"
+ source="1.5" target="1.5"
+ debug="on" nowarn="on" deprecation="off">
+ <include name="org/eigenbase/**/*.java" />
+ <include name="com/disruptivetech/farrago/volcano/**/*.java" />
+ <exclude name="org/eigenbase/inventory/**/*.java" />
+ <classpath refid="farrago.run.classpath"/>
+ </javac>
+-->
+</target>
+
+<target name="jar" depends="compile">
+ <delete file="${jar}"/>
+
+ <jar jarfile="${jar}"
+ basedir="${build.dir}" />
+
+</target>
+
+</project>
=====================================
debian/changelog
=====================================
@@ -0,0 +1,51 @@
+eigenbase-farrago (0.9.0+dfsg-1) UNRELEASED; urgency=medium
+
+ * QA upload.
+ * Vcs-fields:
+ - Fix cut-n-pasto
+ - Point to Salsa
+ * d/watch:
+ - version=4
+ - secure URI
+ - uversionmangle
+ * d/copyright:
+ - secure URIs
+ - Files-Excluded
+ * Drop manual scripts to exclude files
+
+ -- Andreas Tille <tille at debian.org> Fri, 22 Aug 2025 23:33:05 +0200
+
+eigenbase-farrago (0.9.0-3) unstable; urgency=medium
+
+ * QA upload.
+ * Set maintainer to Debian QA Group <packages at qa.debian.org>. (see: #889328)
+
+ -- Marcos Talau <talau at debian.org> Sun, 13 Nov 2022 19:53:15 -0300
+
+eigenbase-farrago (0.9.0-2.1) unstable; urgency=medium
+
+ * Non maintainer upload by the Reproducible Builds team.
+ * No source change upload to rebuild on buildd with .buildinfo files.
+
+ -- Holger Levsen <holger at debian.org> Thu, 07 Jan 2021 13:22:46 +0100
+
+eigenbase-farrago (0.9.0-2) unstable; urgency=medium
+
+ * Team upload.
+ * Install the Maven artifacts
+ * Removed the JRE dependency from the binary package
+ * Build with the DH sequencer instead of CDBS
+ * Moved the package to Git
+ * Standards-Version updated to 3.9.8
+ * Switch to debhelper level 9
+ * Switch to source format 3.0 (quilt)
+ * Converted debian/copyright to the Copyright Format 1.0
+ * Use XZ compression for the upstream tarball
+
+ -- Emmanuel Bourg <ebourg at apache.org> Thu, 28 Jul 2016 11:30:07 +0200
+
+eigenbase-farrago (0.9.0-1) unstable; urgency=low
+
+ * Initial release. (Closes: #560234)
+
+ -- Damien Raude-Morvan <drazzib at debian.org> Thu, 10 Dec 2009 00:34:32 +0100
=====================================
debian/compat
=====================================
@@ -0,0 +1 @@
+9
=====================================
debian/control
=====================================
@@ -0,0 +1,23 @@
+Source: eigenbase-farrago
+Section: java
+Priority: optional
+Maintainer: Debian QA Group <packages at qa.debian.org>
+Build-Depends: debhelper (>= 9), default-jdk, ant, maven-repo-helper
+Build-Depends-Indep: libeigenbase-resgen-java, junit, default-jdk-doc, junit-doc
+Standards-Version: 3.9.8
+Vcs-Browser: https://salsa.debian.org/java-team/eigenbase-farrago
+Vcs-Git: https://salsa.debian.org/java-team/eigenbase-farrago.git
+Homepage: http://farrago.sourceforge.net/
+
+Package: libeigenbase-farrago-java
+Architecture: all
+Depends: ${misc:Depends}, libeigenbase-resgen-java
+Description: Java framework for constructing RDBMS services
+ Farrago is an extensible platform for constructing
+ enterprise-class RDBMS services
+ .
+ Farrago is not an end-user product like MySQL or PostgreSQL.
+ It provides a standards-based pluggable architecture, component library, and
+ toolset for developers of other projects which specialize it.
+ .
+ This package only ship eigenbase-properties part of Farrago.
=====================================
debian/copyright
=====================================
@@ -0,0 +1,68 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Eigenbase Farago
+Source: https://sourceforge.net/projects/farrago/files/
+Files-Excluded: *.vsd
+ *.sxd
+ *.odg
+ *.doc
+ unitsql/*
+ testlog/*
+ regressionsql/*
+ testcases/*
+
+Files: *
+Copyright: 2002-2009, The Eigenbase Project
+ 2002-2009, SQLstream, Inc.
+ 2002-2009, LucidEra, Inc.
+ 2002-2009, John V. Sichi
+ 2005-2009, Xiaoyang Luo
+License: GPL-2+ with linking GPL-incompatible libraries exception
+
+Files: debian/*
+Copyright: 2008-2009, Damien Raude-Morvan <drazzib at debian.org>
+License: GPL-2+
+ On Debian systems you can find the complete text of the
+ GPL v2 license in `/usr/share/common-licenses/GPL-2'.
+
+License: GPL-2+ with linking GPL-incompatible libraries exception
+ This software is released under the GNU General Public License,
+ which is reproduced below.
+ .
+ In addition, as a special exception, The Eigenbase Project gives
+ permission to link the code of this program with the following
+ GPL-incompatible libraries, and distribute linked combinations
+ including all of these:
+ .
+ - MDR library from Netbeans (or modified versions of MDR that use
+ the same license as MDR--the Sun Public License), including JMI
+ interfaces from Sun Microsystems
+ .
+ - All standard Java runtime libraries distributed by Sun Microsystems
+ as part of any release of J2SE or J2EE
+ .
+ - MOF, UML, and CWM model definitions from Object Management Group
+ .
+ - Apache Commons from the Apache Software Foundation
+ .
+ - Hibernate and supporting libraries from Red Hat Middleware
+ .
+ You must obey the GNU General Public License in all respects for all
+ of the code used other than the libraries listed above. If you modify
+ this program, you may extend this exception to your version of the
+ program, but you are not obligated to do so. If you do not wish to do
+ so, delete this exception statement from your version.
+ .
+ ======================================================
+ .
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your option)
+ any later version approved by The Eigenbase Project.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ On Debian systems you can find the complete text of the
+ GPL v2 license in `/usr/share/common-licenses/GPL-2'.
=====================================
debian/libeigenbase-farrago-java.poms
=====================================
@@ -0,0 +1,28 @@
+# List of POM files for the package
+# Format of this file is:
+# <path to pom file> [option]*
+# where option can be:
+# --ignore: ignore this POM and its artifact if any
+# --ignore-pom: don't install the POM. To use on POM files that are created
+# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
+# --no-parent: remove the <parent> tag from the POM
+# --package=<package>: an alternative package to use when installing this POM
+# and its artifact
+# --has-package-version: to indicate that the original version of the POM is the same as the upstream part
+# of the version for the package.
+# --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
+# during a clean operation with mh_cleanpom or mh_installpom
+# --artifact=<path>: path to the build artifact associated with this POM,
+# it will be installed when using the command mh_install. [mh_install]
+# --java-lib: install the jar into /usr/share/java to comply with Debian
+# packaging guidelines
+# --usj-name=<name>: name to use when installing the library in /usr/share/java
+# --usj-version=<version>: version to use when installing the library in /usr/share/java
+# --no-usj-versionless: don't install the versionless link in /usr/share/java
+# --dest-jar=<path>: the destination for the real jar.
+# It will be installed with mh_install. [mh_install]
+# --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+# --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
+# Empty by default. [mh_install]
+#
+debian/pom.xml --has-package-version --java-lib --artifact=build/eigenbase-properties.jar
=====================================
debian/patches/javadoc_links.diff
=====================================
@@ -0,0 +1,23 @@
+Description: Fix link of Javadoc HTML documentation
+ to use local API from /usr/share/doc/
+Author: Damien Raude-Morvan <drazzib at debian.org>
+Last-Update: 2009-12-13
+Forwarded: not-needed
+--- a/build.xml
++++ b/build.xml
+@@ -1545,13 +1545,8 @@
+ <packageset dir="${farrago.dir}/examples/rng/catalog/java">
+ <include name="**"/>
+ </packageset>
+- <link href="http://www.netbeans.org/download/dev/javadoc/org-netbeans-api-mdr"/>
+- <link href="http://java.sun.com/products/jmi/jmi-1_0-fr-doc"/>
+- <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
+- <link href="http://www.junit.org/junit/javadoc/3.8.1"/>
+- <link href="http://www.janino.net/javadoc"/>
+- <link href="http://www.csg.is.titech.ac.jp/openjava/OpenJava_1.1/htdocs"/>
+- <link href="${enki.dir}/javadoc"/>
++ <link href="/usr/share/doc/default-jdk-doc/api/"/>
++ <link href="/usr/share/doc/junit-doc/doc/api/"/>
+ <doclet
+ name="ydoc.doclets.YStandard"
+ path="${ydoc.home}/lib/ydoc.jar${ps}${ydoc.home}/lib/class2svg.jar${ps}${ydoc.home}/resources${ps}${ydoc.home}/doc">
=====================================
debian/patches/properties_java5_api.diff
=====================================
@@ -0,0 +1,76 @@
+Description: Update TriggerableProperties and Property to enable generics API
+ (those were commented out in upstream source code)
+Author: Damien Raude-Morvan <drazzib at debian.org>
+Last-Update: 2009-12-13
+Forwarded: no
+--- a/src/org/eigenbase/util/property/Property.java
++++ b/src/org/eigenbase/util/property/Property.java
+@@ -262,10 +262,10 @@
+ // this is the object to add to list
+ Object o =
+ (trigger.isPersistent()) ? trigger
+- : (Object) new WeakReference /*<Trigger>*/(trigger);
++ : (Object) new WeakReference<Trigger>(trigger);
+
+ // Add a Trigger in the correct group of phases in the list
+- for (ListIterator /*<Object>*/ it = listIterator(); it.hasNext();) {
++ for (ListIterator<Object> it = listIterator(); it.hasNext();) {
+ Trigger t = convert(it.next());
+
+ if (t == null) {
+@@ -324,9 +324,9 @@
+ // a clone) so that we can remove any WeakReference whose
+ // content has become null. Synchronize, per the locking strategy,
+ // while the copy is being made.
+- List /*<Trigger>*/ l = new ArrayList /*<Trigger>*/();
++ List<Trigger> l = new ArrayList <Trigger>();
+ synchronized (property) {
+- for (Iterator /*<Object>*/ it = iterator(); it.hasNext();) {
++ for (Iterator<Object> it = iterator(); it.hasNext();) {
+ Trigger t = convert(it.next());
+ if (t == null) {
+ it.remove();
+--- a/src/org/eigenbase/util/property/TriggerableProperties.java
++++ b/src/org/eigenbase/util/property/TriggerableProperties.java
+@@ -43,8 +43,8 @@
+ //~ Instance fields --------------------------------------------------------
+
+ protected final Map triggers = new HashMap();
+- protected final Map /*<String, Property>*/ properties =
+- new HashMap /*<String, Property>*/();
++ protected final Map<String, Property> properties =
++ new HashMap <String, Property>();
+
+ //~ Constructors -----------------------------------------------------------
+
+@@ -121,7 +121,7 @@
+ */
+ public Property getPropertyDefinition(String path)
+ {
+- final List /*<Property>*/ propertyList = getPropertyList();
++ final List<Property> propertyList = getPropertyList();
+ for (int i = 0; i < propertyList.size(); i++) {
+ Property property = (Property) propertyList.get(i);
+ if (property.getPath().equals(path)) {
+@@ -166,7 +166,7 @@
+ *
+ * @return registered properties
+ */
+- public Collection /*<Property>*/ getProperties()
++ public Collection<Property> getProperties()
+ {
+ return Collections.unmodifiableCollection(properties.values());
+ }
+@@ -176,10 +176,10 @@
+ *
+ * @return List of properties
+ */
+- public List /*<Property>*/ getPropertyList()
++ public List<Property> getPropertyList()
+ {
+ Field [] fields = getClass().getFields();
+- List /*<Property>*/ list = new ArrayList /*<Property>*/();
++ List<Property> list = new ArrayList<Property>();
+ for (int i = 0; i < fields.length; i++) {
+ Field field = fields[i];
+ if (!Modifier.isStatic(field.getModifiers())
=====================================
debian/patches/series
=====================================
@@ -0,0 +1,2 @@
+properties_java5_api.diff
+javadoc_links.diff
=====================================
debian/pom.xml
=====================================
@@ -0,0 +1,7 @@
+<?xml version="1.0"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>eigenbase</groupId>
+ <artifactId>eigenbase-properties</artifactId>
+ <version>0.9.0</version>
+ <url>http://www.eigenbase.org/</url>
+</project>
=====================================
debian/rules
=====================================
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@ --buildsystem=ant --with maven-repo-helper
+
+override_dh_auto_build:
+ dh_auto_build -- -f debian/build.xml jar
+
+override_dh_auto_clean:
+ dh_auto_clean -- -f debian/build.xml clean
=====================================
debian/source/format
=====================================
@@ -0,0 +1 @@
+3.0 (quilt)
=====================================
debian/watch
=====================================
@@ -0,0 +1,4 @@
+version=4
+
+opts="repacksuffix=+dfsg,dversionmangle=auto" \
+ https://sf.net/farrago/farrago-src-([\d\.]+).tar.bz2
=====================================
examples/miniplan/unitsql/miniplan.ref
=====================================
@@ -0,0 +1,126 @@
+> -- $Id: //open/dev/farrago/examples/miniplan/unitsql/miniplan.ref#1 $
+> -- Test the miniplan tutorial
+> -- If you get difs in this test, please update
+> -- http://pub.eigenbase.org/wiki/HowToWriteAnOptimizer
+> -- as part of updating the .ref file. Thanks!
+>
+> create schema miniplan;
+> set schema 'miniplan';
+> set path 'miniplan';
+>
+> -- register UDX we'll use to populate test data
+> create function ramp(n int)
+> returns table(i int)
+> language java
+> parameter style system defined java
+> no sql
+> external name 'class net.sf.farrago.test.FarragoTestUDR.ramp';
+>
+> -- define two physical partitions with identical table definition
+> -- column pk: primary key
+> -- column hicard: will contain mostly distinct values
+> -- column locard: will contain mostly duplicate values
+> create table t1(pk int not null primary key, hicard int, locard int);
+> create table t2(pk int not null primary key, hicard int, locard int);
+>
+> -- define a logical view combining the physical partitions
+> create view v as select * from t1 union all select * from t2;
+>
+> -- populate the first partition, manipulating the UDX output to produce the
+> -- desired data patterns
+> insert into t1(pk,hicard,locard)
+> select i,i*0.9,i*0.04 from table(ramp(1000));
+>
+> -- populate the second partition (with a similar but not identical data
+> -- distribution)
+> insert into t2(pk,hicard,locard)
+> select i+1000,i*0.8,i*0.05 from table(ramp(1000));
+>
+> -- make some stats on the data distribution available to the optimizer
+> analyze table t1 compute statistics for all columns;
+> analyze table t2 compute statistics for all columns;
+>
+> create jar miniplan_plugin
+> library 'file:${FARRAGO_HOME}/examples/miniplan/plugin/FarragoMiniplan.jar'
+> options(0);
+>
+> alter session implementation set jar miniplan.miniplan_plugin;
+>
+> !set outputformat csv
+>
+> explain plan for
+> select * from sales.depts union all select * from sales.depts;
+'column0'
+'FennelToIteratorConverter'
+' FennelMergeRel'
+' FtrsIndexScanRel(table=[[LOCALDB, SALES, DEPTS]], projection=[*], index=[SYS$CONSTRAINT_INDEX$SYS$PRIMARY_KEY$DEPTS], preserveOrder=[false])'
+' FtrsIndexScanRel(table=[[LOCALDB, SALES, DEPTS]], projection=[*], index=[SYS$CONSTRAINT_INDEX$SYS$PRIMARY_KEY$DEPTS], preserveOrder=[false])'
+>
+> explain plan excluding attributes for select sum(hicard) from miniplan.v;
+'column0'
+'FennelToIteratorConverter'
+' FennelAggRel'
+' FennelMergeRel'
+' FennelAggRel'
+' FtrsIndexScanRel'
+' FennelAggRel'
+' FtrsIndexScanRel'
+>
+> explain plan excluding attributes for select sum(hicard) from miniplan.v;
+'column0'
+'FennelToIteratorConverter'
+' FennelAggRel'
+' FennelMergeRel'
+' FennelAggRel'
+' FtrsIndexScanRel'
+' FennelAggRel'
+' FtrsIndexScanRel'
+>
+> explain plan excluding attributes for
+> select locard,sum(hicard) from miniplan.v group by locard;
+'column0'
+'FennelToIteratorConverter'
+' LhxAggRel'
+' FennelMergeRel'
+' LhxAggRel'
+' FtrsIndexScanRel'
+' LhxAggRel'
+' FtrsIndexScanRel'
+>
+> explain plan excluding attributes for
+> select hicard,sum(locard) from miniplan.v group by hicard;
+'column0'
+'FennelToIteratorConverter'
+' LhxAggRel'
+' FennelMergeRel'
+' LhxAggRel'
+' FtrsIndexScanRel'
+' LhxAggRel'
+' FtrsIndexScanRel'
+>
+> alter session set "volcano" = true;
+>
+> explain plan excluding attributes for
+> select locard,sum(hicard) from miniplan.v group by locard;
+'column0'
+'FennelToIteratorConverter'
+' LhxAggRel'
+' FennelMergeRel'
+' LhxAggRel'
+' FennelReshapeRel'
+' FtrsIndexScanRel'
+' LhxAggRel'
+' FennelReshapeRel'
+' FtrsIndexScanRel'
+>
+> explain plan excluding attributes for
+> select hicard,sum(locard) from miniplan.v group by hicard;
+'column0'
+'FennelToIteratorConverter'
+' LhxAggRel'
+' FennelMergeRel'
+' FtrsIndexScanRel'
+' FtrsIndexScanRel'
+>
+>
+> !quit
=====================================
examples/miniplan/unitsql/miniplan.sql
=====================================
@@ -0,0 +1,71 @@
+-- $Id: //open/dev/farrago/examples/miniplan/unitsql/miniplan.sql#1 $
+-- Test the miniplan tutorial
+-- If you get difs in this test, please update
+-- http://pub.eigenbase.org/wiki/HowToWriteAnOptimizer
+-- as part of updating the .ref file. Thanks!
+
+create schema miniplan;
+set schema 'miniplan';
+set path 'miniplan';
+
+-- register UDX we'll use to populate test data
+create function ramp(n int)
+returns table(i int)
+language java
+parameter style system defined java
+no sql
+external name 'class net.sf.farrago.test.FarragoTestUDR.ramp';
+
+-- define two physical partitions with identical table definition
+-- column pk: primary key
+-- column hicard: will contain mostly distinct values
+-- column locard: will contain mostly duplicate values
+create table t1(pk int not null primary key, hicard int, locard int);
+create table t2(pk int not null primary key, hicard int, locard int);
+
+-- define a logical view combining the physical partitions
+create view v as select * from t1 union all select * from t2;
+
+-- populate the first partition, manipulating the UDX output to produce the
+-- desired data patterns
+insert into t1(pk,hicard,locard)
+select i,i*0.9,i*0.04 from table(ramp(1000));
+
+-- populate the second partition (with a similar but not identical data
+-- distribution)
+insert into t2(pk,hicard,locard)
+select i+1000,i*0.8,i*0.05 from table(ramp(1000));
+
+-- make some stats on the data distribution available to the optimizer
+analyze table t1 compute statistics for all columns;
+analyze table t2 compute statistics for all columns;
+
+create jar miniplan_plugin
+library 'file:${FARRAGO_HOME}/examples/miniplan/plugin/FarragoMiniplan.jar'
+options(0);
+
+alter session implementation set jar miniplan.miniplan_plugin;
+
+!set outputformat csv
+
+explain plan for
+select * from sales.depts union all select * from sales.depts;
+
+explain plan excluding attributes for select sum(hicard) from miniplan.v;
+
+explain plan excluding attributes for select sum(hicard) from miniplan.v;
+
+explain plan excluding attributes for
+select locard,sum(hicard) from miniplan.v group by locard;
+
+explain plan excluding attributes for
+select hicard,sum(locard) from miniplan.v group by hicard;
+
+alter session set "volcano" = true;
+
+explain plan excluding attributes for
+select locard,sum(hicard) from miniplan.v group by locard;
+
+explain plan excluding attributes for
+select hicard,sum(locard) from miniplan.v group by hicard;
+
=====================================
examples/rng/unitsql/createPreUpgrade.ref
=====================================
@@ -0,0 +1,12 @@
+> -- $Id: //open/dev/farrago/examples/rng/unitsql/createPreUpgrade.ref#3 $
+> -- Test creation of objects which are to survive plugin installation
+>
+> -- before catalog upgrade, save a copy of the catalog with some objects in it
+> -- so that we can verify that catalog can be restored after upgrade;
+> -- we put stuff in sys_boot so that it won't be dropped by test cleanup
+> create schema sys_boot.old_stuff;
+> create table sys_boot.old_stuff.t(i int not null primary key);
+> call sys_boot.mgmt.export_catalog_xmi(
+> '${FARRAGO_HOME}/testgen/upgrade/FarragoCatalogDump.xmi');
+>
+> !quit
=====================================
examples/rng/unitsql/createPreUpgrade.sql
=====================================
@@ -0,0 +1,10 @@
+-- $Id: //open/dev/farrago/examples/rng/unitsql/createPreUpgrade.sql#1 $
+-- Test creation of objects which are to survive plugin installation
+
+-- before catalog upgrade, save a copy of the catalog with some objects in it
+-- so that we can verify that catalog can be restored after upgrade;
+-- we put stuff in sys_boot so that it won't be dropped by test cleanup
+create schema sys_boot.old_stuff;
+create table sys_boot.old_stuff.t(i int not null primary key);
+call sys_boot.mgmt.export_catalog_xmi(
+ '${FARRAGO_HOME}/testgen/upgrade/FarragoCatalogDump.xmi');
=====================================
examples/rng/unitsql/installPlugin.ref
=====================================
@@ -0,0 +1,14 @@
+> -- $Id: //open/dev/farrago/examples/rng/unitsql/installPlugin.ref#5 $
+> -- Test installation of RNG plugin
+>
+> set schema 'sys_boot.sys_boot';
+>
+> create jar rngplugin
+> library 'file:${FARRAGO_HOME}/examples/rng/plugin/FarragoRng.jar'
+> options(0);
+>
+> -- NOTE: this will shut down the system, so don't add any commands
+> -- after it
+> alter system add catalog jar rngplugin;
+>
+> !quit
=====================================
examples/rng/unitsql/installPlugin.sql
=====================================
@@ -0,0 +1,12 @@
+-- $Id: //open/dev/farrago/examples/rng/unitsql/installPlugin.sql#2 $
+-- Test installation of RNG plugin
+
+set schema 'sys_boot.sys_boot';
+
+create jar rngplugin
+library 'file:${FARRAGO_HOME}/examples/rng/plugin/FarragoRng.jar'
+options(0);
+
+-- NOTE: this will shut down the system, so don't add any commands
+-- after it
+alter system add catalog jar rngplugin;
=====================================
examples/rng/unitsql/testPlugin.ref
=====================================
@@ -0,0 +1,451 @@
+> -- $Id: //open/dev/farrago/examples/rng/unitsql/testPlugin.ref#26 $
+> -- Test usage of RNG plugin
+>
+> -- verify that without plugin enabled, custom syntax is unrecognized
+>
+> create schema rngtest;
+> set schema 'rngtest';
+> set path 'rngtest';
+>
+> -- should fail
+> create rng rng1 external '${FARRAGO_HOME}/testgen/rng1.dat' seed 999;
+Error: org.eigenbase.sql.parser.SqlParseException: Encountered "rng" at line 1, column 8.
+Was expecting one of:
+ "CLUSTERED" ...
+ "INDEX" ...
+ "LABEL" ...
+ "OR" ...
+ "ROLE" ...
+ "SCHEMA" ...
+ "SERVER" ...
+ "USER" ...
+ "LOCAL" ...
+ "FOREIGN" ...
+ "TABLE" ...
+ "GLOBAL" ...
+ "VIEW" ...
+ "FUNCTION" ...
+ "PROCEDURE" ...
+ "SPECIFIC" ...
+ "JAR" ...
+ "TYPE" ...
+ "ORDERING" ... (state=,code=0)
+>
+>
+> -- now, enable plugin personality for this session
+> alter session implementation set jar sys_boot.sys_boot.rngplugin;
+>
+>
+> -- create some random number generators; use seeds to guarantee determinism
+>
+> create rng rng1 external '${FARRAGO_HOME}/testgen/rng1.dat' seed 999;
+>
+> create rng rng2 external '${FARRAGO_HOME}/testgen/rng2.dat' seed 999;
+>
+> create rng rng3 external '${FARRAGO_HOME}/testgen/rng3.dat' seed 777;
+>
+> create function rng_next_int(
+> rng_name varchar(512),
+> n int)
+> returns int
+> language java
+> reads sql data
+> external name
+> 'sys_boot.sys_boot.rngplugin:net.sf.farrago.rng.FarragoRngUDR.rng_next_int';
+>
+> -- test various ways of naming the rng
+>
+> values rng_next_int('rng1',10);
++---------+
+| EXPR$0 |
++---------+
+| 9 |
++---------+
+>
+> values rng_next_int('RNG1',10);
++---------+
+| EXPR$0 |
++---------+
+| 1 |
++---------+
+>
+> values rng_next_int('localdb.rngtest."RNG1"',10);
++---------+
+| EXPR$0 |
++---------+
+| 1 |
++---------+
+>
+> values rng_next_int('localdb.rngtest.rng1',10);
++---------+
+| EXPR$0 |
++---------+
+| 7 |
++---------+
+>
+> values rng_next_int('rng1',10);
++---------+
+| EXPR$0 |
++---------+
+| 2 |
++---------+
+>
+> values rng_next_int('rng1',10);
++---------+
+| EXPR$0 |
++---------+
+| 5 |
++---------+
+>
+> -- should fail: bad schema
+> values rng_next_int('sales.rng1',10);
+Error: DDL validation error: Reference to unknown random number generator "RNG1" (state=,code=0)
+>
+> -- should fail: no such RNG
+> values rng_next_int('rng_nonexistent',10);
+Error: DDL validation error: Reference to unknown random number generator "RNG_NONEXISTENT" (state=,code=0)
+>
+>
+> -- verify that rng with same initial seed yields same sequence
+>
+> values rng_next_int('rng2',10);
++---------+
+| EXPR$0 |
++---------+
+| 9 |
++---------+
+>
+> values rng_next_int('rng2',10);
++---------+
+| EXPR$0 |
++---------+
+| 1 |
++---------+
+>
+> values rng_next_int('rng2',10);
++---------+
+| EXPR$0 |
++---------+
+| 1 |
++---------+
+>
+> values rng_next_int('rng2',10);
++---------+
+| EXPR$0 |
++---------+
+| 7 |
++---------+
+>
+> values rng_next_int('rng2',10);
++---------+
+| EXPR$0 |
++---------+
+| 2 |
++---------+
+>
+> values rng_next_int('rng2',10);
++---------+
+| EXPR$0 |
++---------+
+| 5 |
++---------+
+>
+>
+> -- verify that rng with different initial seed yields different sequence
+>
+> values rng_next_int('rng3',10);
++---------+
+| EXPR$0 |
++---------+
+| 0 |
++---------+
+>
+> values rng_next_int('rng3',10);
++---------+
+| EXPR$0 |
++---------+
+| 6 |
++---------+
+>
+> values rng_next_int('rng3',10);
++---------+
+| EXPR$0 |
++---------+
+| 2 |
++---------+
+>
+> values rng_next_int('rng3',10);
++---------+
+| EXPR$0 |
++---------+
+| 2 |
++---------+
+>
+> values rng_next_int('rng3',10);
++---------+
+| EXPR$0 |
++---------+
+| 5 |
++---------+
+>
+> values rng_next_int('rng3',10);
++---------+
+| EXPR$0 |
++---------+
+| 9 |
++---------+
+>
+>
+> -- test fancy syntax
+> values next_random_int(ceiling 10 from rng2);
++---------+
+| EXPR$0 |
++---------+
+| 8 |
++---------+
+>
+> values next_random_int(unbounded from rng2);
++------------+
+| EXPR$0 |
++------------+
+| 512689831 |
++------------+
+>
+>
+> -- test view over rng
+>
+> create view random_personality_view as
+> values next_random_int(ceiling 10 from rng2);
+>
+> create view random_udf_view as
+> values rng_next_int('rng2',10);
+>
+> select * from random_personality_view;
++---------+
+| EXPR$0 |
++---------+
+| 1 |
++---------+
+>
+> select * from random_udf_view;
++---------+
+| EXPR$0 |
++---------+
+| 4 |
++---------+
+>
+> -- should fail: dependency
+> drop rng rng2 restrict;
+Error: Dropping random number generator "RNGTEST"."RNG2" requires CASCADE because other objects still reference it (state=,code=0)
+>
+> -- should fail: SELECT DISTINCT feature is disabled in this personality
+> select distinct empno from sales.emps order by empno;
+Error: SELECT DISTINCT not supported (state=,code=0)
+>
+> -- now, disable plugin personality for this session
+> alter session implementation set default;
+>
+> -- flush query cache
+> call sys_boot.mgmt.flush_code_cache();
+>
+> -- verify that DDL personality is wiped out
+> -- should fail
+> create rng rng4 external '${FARRAGO_HOME}/testgen/rng4.dat' seed 777;
+Error: org.eigenbase.sql.parser.SqlParseException: Encountered "rng" at line 1, column 8.
+Was expecting one of:
+ "CLUSTERED" ...
+ "INDEX" ...
+ "LABEL" ...
+ "OR" ...
+ "ROLE" ...
+ "SCHEMA" ...
+ "SERVER" ...
+ "USER" ...
+ "LOCAL" ...
+ "FOREIGN" ...
+ "TABLE" ...
+ "GLOBAL" ...
+ "VIEW" ...
+ "FUNCTION" ...
+ "PROCEDURE" ...
+ "SPECIFIC" ...
+ "JAR" ...
+ "TYPE" ...
+ "ORDERING" ... (state=,code=0)
+>
+> -- verify that we can still access plugin functionality via UDF
+> values rng_next_int('rng3',10);
++---------+
+| EXPR$0 |
++---------+
+| 0 |
++---------+
+>
+> -- sorry, view based on personality will no longer work :(
+> select * from random_personality_view;
+Error: org.eigenbase.sql.parser.SqlParseException: Encountered "CEILING 10" at line 2, column 34.
+Was expecting one of:
+ "ALL" ...
+ "CURSOR" ...
+ "DISTINCT" ...
+ "EXISTS" ...
+ "NOT" ...
+ "ROW" ...
+ "(" ...
+ "+" ...
+ "-" ...
+ <UNSIGNED_INTEGER_LITERAL> ...
+ <DECIMAL_NUMERIC_LITERAL> ...
+ <APPROX_NUMERIC_LITERAL> ...
+ <BINARY_STRING_LITERAL> ...
+ <PREFIXED_STRING_LITERAL> ...
+ <QUOTED_STRING> ...
+ <UNICODE_STRING_LITERAL> ...
+ "TRUE" ...
+ "FALSE" ...
+ "UNKNOWN" ...
+ "NULL" ...
+ <LBRACE_D> ...
+ <LBRACE_T> ...
+ <LBRACE_TS> ...
+ "DATE" ...
+ "TIME" ...
+ "TIMESTAMP" ...
+ "INTERVAL" ...
+ "?" ...
+ "CAST" ...
+ "EXTRACT" ...
+ "POSITION" ...
+ "CONVERT" ...
+ "TRANSLATE" ...
+ "OVERLAY" ...
+ "FLOOR" ...
+ "CEIL" ...
+ "CEILING" ...
+ "CEILING" "(" ...
+ "SUBSTRING" ...
+ "TRIM" ...
+ <LBRACE_FN> ...
+ "MULTISET" ...
+ "SPECIFIC" ...
+ <IDENTIFIER> ...
+ <QUOTED_IDENTIFIER> ...
+ <UNICODE_QUOTED_IDENTIFIER> ...
+ "ABS" ...
+ "AVG" ...
+ "CARDINALITY" ...
+ "CHAR_LENGTH" ...
+ "CHARACTER_LENGTH" ...
+ "COALESCE" ...
+ "COLLECT" ...
+ "CUME_DIST" ...
+ "COUNT" ...
+ "CURRENT_DATE" ...
+ "CURRENT_TIME" ...
+ "CURRENT_TIMESTAMP" ...
+ "DENSE_RANK" ...
+ "ELEMENT" ...
+ "EXP" ...
+ "FIRST_VALUE" ...
+ "FUSION" ...
+ "LAST_VALUE" ...
+ "LN" ...
+ "LOCALTIME" ...
+ "LOCALTIMESTAMP" ...
+ "LOWER" ...
+ "MAX" ...
+ "MIN" ...
+ "MOD" ...
+ "NULLIF" ...
+ "OCTET_LENGTH" ...
+ "PERCENT_RANK" ...
+ "POWER" ...
+ "RANK" ...
+ "ROW_NUMBER" ...
+ "SQRT" ...
+ "SUM" ...
+ "UPPER" ...
+ "CURRENT_CATALOG" ...
+ "CURRENT_DEFAULT_TRANSFORM_GROUP" ...
+ "CURRENT_PATH" ...
+ "CURRENT_ROLE" ...
+ "CURRENT_SCHEMA" ...
+ "CURRENT_USER" ...
+ "SESSION_USER" ...
+ "SYSTEM_USER" ...
+ "USER" ...
+ "NEW" ...
+ "CASE" ...
+ "*" ...
+ ")" ... (state=,code=0)
+>
+> -- but view based on UDF will
+> select * from random_udf_view;
++---------+
+| EXPR$0 |
++---------+
+| 5 |
++---------+
+>
+> -- verify that DROP CASCADE works correctly even without DDL personality
+> -- TODO: use Java filesystem access to verify creation/deletion of .dat file
+> drop schema rngtest cascade;
+> drop schema sys_boot.old_stuff cascade;
+>
+> -- verify that SELECT DISTINCT is working again
+> select distinct empno from sales.emps order by empno;
++--------+
+| EMPNO |
++--------+
+| 100 |
+| 110 |
+| 120 |
++--------+
+>
+> -- NOTE jvs 4-Mar-2009: This doesn't really belong here, but this
+> -- test is currently the only place where we restore a clean catalog,
+> -- so it's convenient for testing out the procedure for switching to Unicode
+>
+> create schema typecheck;
+>
+> create view typecheck.v as
+> select "characterSetName","collationName","ordinal"
+> from sys_fem."SQL2003"."AbstractColumn"
+> where "name" like 'ASC%DESC';
+>
+> select * from typecheck.v;
++-------------------+---------------------------+----------+
+| characterSetName | collationName | ordinal |
++-------------------+---------------------------+----------+
+| ISO-8859-1 | ISO-8859-1$en_US$primary | 9 |
++-------------------+---------------------------+----------+
+>
+> -- should fail because tables still exist
+> call sys_boot.mgmt.change_default_character_set_to_unicode();
+Error: Cannot change default character set to Unicode because local tables
+have already been defined (state=,code=0)
+>
+> drop schema sales cascade;
+>
+> -- should succeed now since we dropped all the tables
+> call sys_boot.mgmt.change_default_character_set_to_unicode();
+>
+> create view typecheck.v2 as select 'blah' as asc_or_desc from (values(0));
+>
+> -- existing column should have switched from ISO-8859-1 to UNICODE,
+> -- and new column should also be UNICODE; note that collation
+> -- is currently incorrect for new column
+> select * from typecheck.v;
++-------------------+---------------------------+----------+
+| characterSetName | collationName | ordinal |
++-------------------+---------------------------+----------+
+| UTF-16LE | UTF-16LE$en_US | 9 |
+| UTF-16LE | ISO-8859-1$en_US$primary | 0 |
++-------------------+---------------------------+----------+
+>
+> -- last thing we do is to prepare for a restore of pre-upgrade catalog contents
+> -- NOTE: this will shut down the system, so don't add any commands
+> -- after it
+> alter system replace catalog;
+>
+> !quit
=====================================
examples/rng/unitsql/testPlugin.sql
=====================================
@@ -0,0 +1,168 @@
+-- $Id: //open/dev/farrago/examples/rng/unitsql/testPlugin.sql#8 $
+-- Test usage of RNG plugin
+
+-- verify that without plugin enabled, custom syntax is unrecognized
+
+create schema rngtest;
+set schema 'rngtest';
+set path 'rngtest';
+
+-- should fail
+create rng rng1 external '${FARRAGO_HOME}/testgen/rng1.dat' seed 999;
+
+
+-- now, enable plugin personality for this session
+alter session implementation set jar sys_boot.sys_boot.rngplugin;
+
+
+-- create some random number generators; use seeds to guarantee determinism
+
+create rng rng1 external '${FARRAGO_HOME}/testgen/rng1.dat' seed 999;
+
+create rng rng2 external '${FARRAGO_HOME}/testgen/rng2.dat' seed 999;
+
+create rng rng3 external '${FARRAGO_HOME}/testgen/rng3.dat' seed 777;
+
+create function rng_next_int(
+ rng_name varchar(512),
+ n int)
+returns int
+language java
+reads sql data
+external name
+'sys_boot.sys_boot.rngplugin:net.sf.farrago.rng.FarragoRngUDR.rng_next_int';
+
+-- test various ways of naming the rng
+
+values rng_next_int('rng1',10);
+
+values rng_next_int('RNG1',10);
+
+values rng_next_int('localdb.rngtest."RNG1"',10);
+
+values rng_next_int('localdb.rngtest.rng1',10);
+
+values rng_next_int('rng1',10);
+
+values rng_next_int('rng1',10);
+
+-- should fail: bad schema
+values rng_next_int('sales.rng1',10);
+
+-- should fail: no such RNG
+values rng_next_int('rng_nonexistent',10);
+
+
+-- verify that rng with same initial seed yields same sequence
+
+values rng_next_int('rng2',10);
+
+values rng_next_int('rng2',10);
+
+values rng_next_int('rng2',10);
+
+values rng_next_int('rng2',10);
+
+values rng_next_int('rng2',10);
+
+values rng_next_int('rng2',10);
+
+
+-- verify that rng with different initial seed yields different sequence
+
+values rng_next_int('rng3',10);
+
+values rng_next_int('rng3',10);
+
+values rng_next_int('rng3',10);
+
+values rng_next_int('rng3',10);
+
+values rng_next_int('rng3',10);
+
+values rng_next_int('rng3',10);
+
+
+-- test fancy syntax
+values next_random_int(ceiling 10 from rng2);
+
+values next_random_int(unbounded from rng2);
+
+
+-- test view over rng
+
+create view random_personality_view as
+values next_random_int(ceiling 10 from rng2);
+
+create view random_udf_view as
+values rng_next_int('rng2',10);
+
+select * from random_personality_view;
+
+select * from random_udf_view;
+
+-- should fail: dependency
+drop rng rng2 restrict;
+
+-- should fail: SELECT DISTINCT feature is disabled in this personality
+select distinct empno from sales.emps order by empno;
+
+-- now, disable plugin personality for this session
+alter session implementation set default;
+
+-- flush query cache
+call sys_boot.mgmt.flush_code_cache();
+
+-- verify that DDL personality is wiped out
+-- should fail
+create rng rng4 external '${FARRAGO_HOME}/testgen/rng4.dat' seed 777;
+
+-- verify that we can still access plugin functionality via UDF
+values rng_next_int('rng3',10);
+
+-- sorry, view based on personality will no longer work :(
+select * from random_personality_view;
+
+-- but view based on UDF will
+select * from random_udf_view;
+
+-- verify that DROP CASCADE works correctly even without DDL personality
+-- TODO: use Java filesystem access to verify creation/deletion of .dat file
+drop schema rngtest cascade;
+drop schema sys_boot.old_stuff cascade;
+
+-- verify that SELECT DISTINCT is working again
+select distinct empno from sales.emps order by empno;
+
+-- NOTE jvs 4-Mar-2009: This doesn't really belong here, but this
+-- test is currently the only place where we restore a clean catalog,
+-- so it's convenient for testing out the procedure for switching to Unicode
+
+create schema typecheck;
+
+create view typecheck.v as
+select "characterSetName","collationName","ordinal"
+from sys_fem."SQL2003"."AbstractColumn"
+where "name" like 'ASC%DESC';
+
+select * from typecheck.v;
+
+-- should fail because tables still exist
+call sys_boot.mgmt.change_default_character_set_to_unicode();
+
+drop schema sales cascade;
+
+-- should succeed now since we dropped all the tables
+call sys_boot.mgmt.change_default_character_set_to_unicode();
+
+create view typecheck.v2 as select 'blah' as asc_or_desc from (values(0));
+
+-- existing column should have switched from ISO-8859-1 to UNICODE,
+-- and new column should also be UNICODE; note that collation
+-- is currently incorrect for new column
+select * from typecheck.v;
+
+-- last thing we do is to prepare for a restore of pre-upgrade catalog contents
+-- NOTE: this will shut down the system, so don't add any commands
+-- after it
+alter system replace catalog;
=====================================
examples/rng/unitsql/verifyReplaceCatalog.ref
=====================================
@@ -0,0 +1,41 @@
+> -- $Id: //open/dev/farrago/examples/rng/unitsql/verifyReplaceCatalog.ref#3 $
+> -- Test that catalog contents can be restored via
+> -- ALTER SYSTEM REPLACE CATALOG, while preserving upgraded plugin metamodel
+>
+> -- make sure old catalog contents were restored
+> select * from sys_boot.old_stuff.t;
++----+
+| I |
++----+
++----+
+>
+> -- make sure plugin metamodel still works
+> create schema rngtest;
+> set schema 'rngtest';
+> set path 'rngtest';
+>
+> -- have to re-register jar since ALTER SYSTEM REPLACE CATALOG nuked it
+> create jar sys_boot.sys_boot.rngplugin
+> library 'file:${FARRAGO_HOME}/examples/rng/plugin/FarragoRng.jar'
+> options(0);
+>
+> alter session implementation set jar sys_boot.sys_boot.rngplugin;
+>
+> -- NOTE jvs 12-Aug-2006: we can parse CREATE RNG now, but don't
+> -- actually try to use new RNG, because CREATE JAR above didn't
+> -- mark the model extension
+> create rng rng5 external '${FARRAGO_HOME}/testgen/rng5.dat' seed 999;
+>
+> -- drop our old stuff since test cleanup won't do it for us
+> drop schema sys_boot.old_stuff cascade;
+>
+> -- drop plugin too
+> drop rng rng5 cascade;
+> alter session implementation set default;
+> drop jar sys_boot.sys_boot.rngplugin options(0) cascade;
+>
+> -- this one WILL get dropped by the test framework, but that will
+> -- cause a "negative catalog leak", so delete it explicitly here instead
+> drop schema rngtest cascade;
+>
+> !quit
=====================================
examples/rng/unitsql/verifyReplaceCatalog.sql
=====================================
@@ -0,0 +1,35 @@
+-- $Id: //open/dev/farrago/examples/rng/unitsql/verifyReplaceCatalog.sql#1 $
+-- Test that catalog contents can be restored via
+-- ALTER SYSTEM REPLACE CATALOG, while preserving upgraded plugin metamodel
+
+-- make sure old catalog contents were restored
+select * from sys_boot.old_stuff.t;
+
+-- make sure plugin metamodel still works
+create schema rngtest;
+set schema 'rngtest';
+set path 'rngtest';
+
+-- have to re-register jar since ALTER SYSTEM REPLACE CATALOG nuked it
+create jar sys_boot.sys_boot.rngplugin
+library 'file:${FARRAGO_HOME}/examples/rng/plugin/FarragoRng.jar'
+options(0);
+
+alter session implementation set jar sys_boot.sys_boot.rngplugin;
+
+-- NOTE jvs 12-Aug-2006: we can parse CREATE RNG now, but don't
+-- actually try to use new RNG, because CREATE JAR above didn't
+-- mark the model extension
+create rng rng5 external '${FARRAGO_HOME}/testgen/rng5.dat' seed 999;
+
+-- drop our old stuff since test cleanup won't do it for us
+drop schema sys_boot.old_stuff cascade;
+
+-- drop plugin too
+drop rng rng5 cascade;
+alter session implementation set default;
+drop jar sys_boot.sys_boot.rngplugin options(0) cascade;
+
+-- this one WILL get dropped by the test framework, but that will
+-- cause a "negative catalog leak", so delete it explicitly here instead
+drop schema rngtest cascade;
=====================================
ext/mql/unitsql/connected.ref
=====================================
@@ -0,0 +1,279 @@
+> -- $Id: //open/dev/farrago/ext/mql/unitsql/connected.ref#1 $
+> -- Test MQL foreign data wrapper, including the parts
+> -- that actually access the web service
+> -- (so this should not run as part of checkin acceptance tests).
+> -- This test may fail if the Freebase contents have been
+> -- updated since the last time the .ref file was updated.
+>
+> create schema metaweb;
+>
+> create or replace foreign data wrapper mql_wrapper
+> library '${FARRAGO_HOME}/ext/mql/plugin/farrago-mql.jar'
+> language java;
+>
+> create or replace server mql_server
+> foreign data wrapper mql_wrapper;
+>
+> create or replace jar metaweb.mql_jar
+> library 'file:${FARRAGO_HOME}/ext/mql/plugin/farrago-mql.jar'
+> options(0);
+>
+> create or replace function metaweb.mql_query(
+> url varchar(4096),
+> mql varchar(65535),
+> row_type varchar(65535))
+> returns table(
+> objects varchar(128))
+> language java
+> parameter style system defined java
+> dynamic_function
+> no sql
+> external name 'metaweb.mql_jar:net.sf.farrago.namespace.mql.MedMqlUdx.execute';
+>
+> create or replace foreign table metaweb.artists(
+> "name" varchar(128), "id" varchar(128))
+> server mql_server
+> options (metaweb_type '/music/artist');
+>
+> select * from metaweb.artists order by "name";
++-----------------------------------+-----------------------------------------+
+| name | id |
++-----------------------------------+-----------------------------------------+
+| ABBA | /en/abba |
+| Aaliyah | /en/aaliyah |
+| Alban Berg | /en/alban_berg |
+| Alex Lifeson | /en/alex_lifeson |
+| Amr Diab | /en/amr_diab |
+| Amy Grant | /en/amy_grant |
+| Analog Brothers | /en/analog_brothers |
+| Ani DiFranco | /en/ani_difranco |
+| Antonio Diabelli | /en/anton_diabelli |
+| Antonio Salieri | /en/antonio_salieri |
+| Antonio Vivaldi | /en/antonio_vivaldi |
+| Aphex Twin | /en/aphex_twin |
+| Arlo Guthrie | /en/arlo_guthrie |
+| Articolo 31 | /en/articolo_31 |
+| Aztlan Underground | /en/aztlan_underground |
+| BT | /en/brian_transeau |
+| B\u00e9la Bart\u00f3k | /en/bela_bartok |
+| Bar\u0131\u015f Man\u00e7o | /authority/imdb/name/nm0541534 |
+| Beastie Boys | /en/beastie_boys |
+| Belle & Sebastian | /en/belle_sebastian |
+| Big Country | /en/big_country |
+| Bill Clinton | /en/bill_clinton |
+| Bill Haley | /en/bill_haley |
+| Billy Bob Thornton | /en/billy_bob_thornton |
+| Black Sabbath | /en/black_sabbath |
+| Blind Blake | /en/blind_blake |
+| Blind Lemon Jefferson | /en/blind_lemon_jefferson |
+| Blind Willie McTell | /en/blind_willie_mctell |
+| Blonde Redhead | /en/blonde_redhead |
+| Boney M. | /en/boney_m |
+| Bonzo Dog Doo-Dah Band | /en/bonzo_dog_doo-dah_band |
+| Boogie Down Productions | /en/boogie_down_productions |
+| Brian Eno | /en/brian_eno |
+| Brigitte Bardot | /en/brigitte_bardot |
+| Britney Spears | /en/britney_spears |
+| Bronski Beat | /en/bronski_beat |
+| Brownie McGhee | /en/brownie_mcghee |
+| Bruce Cockburn | /en/bruce_cockburn |
+| Buck Owens | /en/buck_owens |
+| Carmen Electra | /en/carmen_electra |
+| Charles Mingus | /en/charles_mingus |
+| Chet Atkins | /en/chet_atkins |
+| Chuck D | /en/chuck_d |
+| Claude Debussy | /en/claude_debussy |
+| Claudio Monteverdi | /en/claudio_monteverdi |
+| Cold Chisel | /en/cold_chisel |
+| Coldcut | /en/coldcut |
+| Commodores | /en/commodores |
+| Crowded House | /en/crowded_house |
+| Cypress Hill | /en/cypress_hill |
+| Danny Elfman | /en/danny_elfman |
+| Dave Brubeck | /en/dave_brubeck |
+| Dave Grohl | /en/dave_grohl |
+| Davy Jones | /en/davy_jones_1945 |
+| Dead Kennedys | /en/dead_kennedys |
+| Deicide | /guid/9202a8c04000641f8000000000013724 |
+| Depeche Mode | /en/depeche_mode |
+| Desi Arnaz | /en/desi_arnaz |
+| Devo | /en/devo |
+| Dimmu Borgir | /en/dimmu_borgir |
+| Django Reinhardt | /en/django_reinhardt |
+| Dmitri Shostakovich | /en/dmitri_shostakovich |
+| Dolly Parton | /en/dolly_parton |
+| Domenico Alberti | /en/domenico_alberti |
+| Don McLean | /en/don_mclean |
+| Donny the Punk | /en/donny_the_punk |
+| Doris Day | /en/doris_day |
+| Dwight Yoakam | /en/dwight_yoakam |
+| Edward Elgar | /en/edward_elgar |
+| Electric Light Orchestra | /en/electric_light_orchestra |
+| Elvis Costello | /en/elvis_costello |
+| Elvis Presley | /en/elvis_presley |
+| Emma Abbott | /en/emma_abbott |
+| Ennio Morricone | /en/ennio_morricone |
+| Eric Clapton | /en/eric_clapton |
+| Fleetwood Mac | /en/fleetwood_mac |
+| Frank Sinatra | /en/frank_sinatra |
+| Frank Zappa | /en/frank_zappa |
+| Frankie Goes to Hollywood | /en/frankie_goes_to_hollywood |
+| Garth Brooks | /en/garth_brooks |
+| Gene Kelly | /en/gene_kelly |
+| George Benson | /en/george_benson |
+| George Frideric Handel | /en/george_frideric_handel |
+| George Harrison | /en/george_harrison |
+| Gheorghe Zamfir | /en/gheorghe_zamfir |
+| Giacomo Puccini | /en/giacomo_puccini |
+| Gioacchino Rossini | /en/gioacchino_rossini |
+| Giovanni Pierluigi da Palestrina | /en/giovanni_pierluigi_da_palestrina |
+| Gloria Gaynor | /en/gloria_gaynor |
+| Goodness | /en/goodness |
+| Goran Bregovi\u0107 | /en/goran_bregovic |
+| Grateful Dead | /en/grateful_dead |
+| Gregorio Allegri | /en/gregorio_allegri |
+| Guitarist | /en/guitarist |
+| Kings of Leon | /en/kings_of_leon |
+| Led Zeppelin | /en/led_zeppelin |
+| The Alan Parsons Project | /en/the_alan_parsons_project |
+| The Beach Boys | /en/the_beach_boys |
+| The Elephant Six Collective | /en/the_elephant_six_collective |
++-----------------------------------+-----------------------------------------+
+| name | id |
++-----------------------------------+-----------------------------------------+
+| Yo La Tengo | /en/yo_la_tengo |
++-----------------------------------+-----------------------------------------+
+>
+> select "id" from metaweb.artists order by "id";
++-----------------------------------------+
+| id |
++-----------------------------------------+
+| /authority/imdb/name/nm0541534 |
+| /en/aaliyah |
+| /en/abba |
+| /en/alban_berg |
+| /en/alex_lifeson |
+| /en/amr_diab |
+| /en/amy_grant |
+| /en/analog_brothers |
+| /en/ani_difranco |
+| /en/anton_diabelli |
+| /en/antonio_salieri |
+| /en/antonio_vivaldi |
+| /en/aphex_twin |
+| /en/arlo_guthrie |
+| /en/articolo_31 |
+| /en/aztlan_underground |
+| /en/beastie_boys |
+| /en/bela_bartok |
+| /en/belle_sebastian |
+| /en/big_country |
+| /en/bill_clinton |
+| /en/bill_haley |
+| /en/billy_bob_thornton |
+| /en/black_sabbath |
+| /en/blind_blake |
+| /en/blind_lemon_jefferson |
+| /en/blind_willie_mctell |
+| /en/blonde_redhead |
+| /en/boney_m |
+| /en/bonzo_dog_doo-dah_band |
+| /en/boogie_down_productions |
+| /en/brian_eno |
+| /en/brian_transeau |
+| /en/brigitte_bardot |
+| /en/britney_spears |
+| /en/bronski_beat |
+| /en/brownie_mcghee |
+| /en/bruce_cockburn |
+| /en/buck_owens |
+| /en/carmen_electra |
+| /en/charles_mingus |
+| /en/chet_atkins |
+| /en/chuck_d |
+| /en/claude_debussy |
+| /en/claudio_monteverdi |
+| /en/cold_chisel |
+| /en/coldcut |
+| /en/commodores |
+| /en/crowded_house |
+| /en/cypress_hill |
+| /en/danny_elfman |
+| /en/dave_brubeck |
+| /en/dave_grohl |
+| /en/davy_jones_1945 |
+| /en/dead_kennedys |
+| /en/depeche_mode |
+| /en/desi_arnaz |
+| /en/devo |
+| /en/dimmu_borgir |
+| /en/django_reinhardt |
+| /en/dmitri_shostakovich |
+| /en/dolly_parton |
+| /en/domenico_alberti |
+| /en/don_mclean |
+| /en/donny_the_punk |
+| /en/doris_day |
+| /en/dwight_yoakam |
+| /en/edward_elgar |
+| /en/electric_light_orchestra |
+| /en/elvis_costello |
+| /en/elvis_presley |
+| /en/emma_abbott |
+| /en/ennio_morricone |
+| /en/eric_clapton |
+| /en/fleetwood_mac |
+| /en/frank_sinatra |
+| /en/frank_zappa |
+| /en/frankie_goes_to_hollywood |
+| /en/garth_brooks |
+| /en/gene_kelly |
+| /en/george_benson |
+| /en/george_frideric_handel |
+| /en/george_harrison |
+| /en/gheorghe_zamfir |
+| /en/giacomo_puccini |
+| /en/gioacchino_rossini |
+| /en/giovanni_pierluigi_da_palestrina |
+| /en/gloria_gaynor |
+| /en/goodness |
+| /en/goran_bregovic |
+| /en/grateful_dead |
+| /en/gregorio_allegri |
+| /en/guitarist |
+| /en/kings_of_leon |
+| /en/led_zeppelin |
+| /en/the_alan_parsons_project |
+| /en/the_beach_boys |
+| /en/the_elephant_six_collective |
+| /en/yo_la_tengo |
++-----------------------------------------+
+| id |
++-----------------------------------------+
+| /guid/9202a8c04000641f8000000000013724 |
++-----------------------------------------+
+>
+> select "name" from metaweb.artists
+> where "id"='/en/gene_kelly';
++-------------+
+| name |
++-------------+
+| Gene Kelly |
++-------------+
+>
+> select * from metaweb.artists
+> where "id"='/en/gene_kelly';
++-------------+-----------------+
+| name | id |
++-------------+-----------------+
+| Gene Kelly | /en/gene_kelly |
++-------------+-----------------+
+>
+> select count(*) from metaweb.artists;
++---------+
+| EXPR$0 |
++---------+
+| 100 |
++---------+
+>
+> !quit
=====================================
ext/mql/unitsql/connected.sql
=====================================
@@ -0,0 +1,48 @@
+-- $Id: //open/dev/farrago/ext/mql/unitsql/connected.sql#1 $
+-- Test MQL foreign data wrapper, including the parts
+-- that actually access the web service
+-- (so this should not run as part of checkin acceptance tests).
+-- This test may fail if the Freebase contents have been
+-- updated since the last time the .ref file was updated.
+
+create schema metaweb;
+
+create or replace foreign data wrapper mql_wrapper
+library '${FARRAGO_HOME}/ext/mql/plugin/farrago-mql.jar'
+language java;
+
+create or replace server mql_server
+foreign data wrapper mql_wrapper;
+
+create or replace jar metaweb.mql_jar
+library 'file:${FARRAGO_HOME}/ext/mql/plugin/farrago-mql.jar'
+options(0);
+
+create or replace function metaweb.mql_query(
+ url varchar(4096),
+ mql varchar(65535),
+ row_type varchar(65535))
+returns table(
+ objects varchar(128))
+language java
+parameter style system defined java
+dynamic_function
+no sql
+external name 'metaweb.mql_jar:net.sf.farrago.namespace.mql.MedMqlUdx.execute';
+
+create or replace foreign table metaweb.artists(
+ "name" varchar(128), "id" varchar(128))
+server mql_server
+options (metaweb_type '/music/artist');
+
+select * from metaweb.artists order by "name";
+
+select "id" from metaweb.artists order by "id";
+
+select "name" from metaweb.artists
+where "id"='/en/gene_kelly';
+
+select * from metaweb.artists
+where "id"='/en/gene_kelly';
+
+select count(*) from metaweb.artists;
=====================================
ext/mql/unitsql/disconnected.ref
=====================================
@@ -0,0 +1,59 @@
+> -- $Id: //open/dev/farrago/ext/mql/unitsql/disconnected.ref#1 $
+> -- Test MQL foreign data wrapper, but only the parts
+> -- that don't actually access the web service so
+> -- that this can run disconnected
+>
+> create schema metaweb;
+>
+> create or replace foreign data wrapper mql_wrapper
+> library '${FARRAGO_HOME}/ext/mql/plugin/farrago-mql.jar'
+> language java;
+>
+> create or replace server mql_server
+> foreign data wrapper mql_wrapper;
+>
+> create or replace jar metaweb.mql_jar
+> library 'file:${FARRAGO_HOME}/ext/mql/plugin/farrago-mql.jar'
+> options(0);
+>
+> create or replace function metaweb.mql_query(
+> url varchar(4096),
+> mql varchar(65535),
+> row_type varchar(65535))
+> returns table(
+> objects varchar(128))
+> language java
+> parameter style system defined java
+> dynamic_function
+> no sql
+> external name 'metaweb.mql_jar:net.sf.farrago.namespace.mql.MedMqlUdx.execute';
+>
+> create or replace foreign table metaweb.artists(
+> "name" varchar(128), "id" varchar(128))
+> server mql_server
+> options (metaweb_type '/music/artist');
+>
+> !set outputformat csv
+>
+> explain plan for select * from metaweb.artists;
+'column0'
+'FarragoJavaUdxRel(invocation=[CAST(MQL_QUERY(CAST('http://api.freebase.com/api/service/mqlread'):VARCHAR(4096) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary", CAST('{"query":[{"type":"/music/artist","id":null,"name":null}]}'):VARCHAR(65535) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary", CAST('name|id'):VARCHAR(65535) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary")):RecordType(VARCHAR(128) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" OBJECTS) NOT NULL])'
+>
+> explain plan for select "id" from metaweb.artists;
+'column0'
+'FarragoJavaUdxRel(invocation=[CAST(MQL_QUERY(CAST('http://api.freebase.com/api/service/mqlread'):VARCHAR(4096) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary", CAST('{"query":[{"type":"/music/artist","id":null}]}'):VARCHAR(65535) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary", CAST('id'):VARCHAR(65535) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary")):RecordType(VARCHAR(128) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" OBJECTS) NOT NULL])'
+>
+> explain plan for select "name" from metaweb.artists
+> where "id"='/en/gene_kelly';
+'column0'
+'FennelToIteratorConverter'
+' FennelReshapeRel(projection=[[0]], outputRowType=[RecordType(VARCHAR(128) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" name) NOT NULL])'
+' IteratorToFennelConverter'
+' FarragoJavaUdxRel(invocation=[CAST(MQL_QUERY(CAST('http://api.freebase.com/api/service/mqlread'):VARCHAR(4096) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary", CAST('{"query":[{"type":"/music/artist","id":"/en/gene_kelly","name":null}]}'):VARCHAR(65535) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary", CAST('name|id'):VARCHAR(65535) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary")):RecordType(VARCHAR(128) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" OBJECTS) NOT NULL])'
+>
+> explain plan for select * from metaweb.artists
+> where "id"='/en/gene_kelly';
+'column0'
+'FarragoJavaUdxRel(invocation=[CAST(MQL_QUERY(CAST('http://api.freebase.com/api/service/mqlread'):VARCHAR(4096) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary", CAST('{"query":[{"type":"/music/artist","id":"/en/gene_kelly","name":null}]}'):VARCHAR(65535) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary", CAST('name|id'):VARCHAR(65535) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary")):RecordType(VARCHAR(128) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" OBJECTS) NOT NULL])'
+>
+> !quit
=====================================
ext/mql/unitsql/disconnected.sql
=====================================
@@ -0,0 +1,46 @@
+-- $Id: //open/dev/farrago/ext/mql/unitsql/disconnected.sql#1 $
+-- Test MQL foreign data wrapper, but only the parts
+-- that don't actually access the web service so
+-- that this can run disconnected
+
+create schema metaweb;
+
+create or replace foreign data wrapper mql_wrapper
+library '${FARRAGO_HOME}/ext/mql/plugin/farrago-mql.jar'
+language java;
+
+create or replace server mql_server
+foreign data wrapper mql_wrapper;
+
+create or replace jar metaweb.mql_jar
+library 'file:${FARRAGO_HOME}/ext/mql/plugin/farrago-mql.jar'
+options(0);
+
+create or replace function metaweb.mql_query(
+ url varchar(4096),
+ mql varchar(65535),
+ row_type varchar(65535))
+returns table(
+ objects varchar(128))
+language java
+parameter style system defined java
+dynamic_function
+no sql
+external name 'metaweb.mql_jar:net.sf.farrago.namespace.mql.MedMqlUdx.execute';
+
+create or replace foreign table metaweb.artists(
+ "name" varchar(128), "id" varchar(128))
+server mql_server
+options (metaweb_type '/music/artist');
+
+!set outputformat csv
+
+explain plan for select * from metaweb.artists;
+
+explain plan for select "id" from metaweb.artists;
+
+explain plan for select "name" from metaweb.artists
+where "id"='/en/gene_kelly';
+
+explain plan for select * from metaweb.artists
+where "id"='/en/gene_kelly';
View it on GitLab: https://salsa.debian.org/java-team/eigenbase-farrago/-/compare/a5f4acca3c1a28554a7632900a26e84dcfeb3e60...0fd7c6b7731542c5e5bee6e41fbcb1989eed16ce
--
View it on GitLab: https://salsa.debian.org/java-team/eigenbase-farrago/-/compare/a5f4acca3c1a28554a7632900a26e84dcfeb3e60...0fd7c6b7731542c5e5bee6e41fbcb1989eed16ce
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20250822/0949d0e1/attachment.htm>
More information about the pkg-java-commits
mailing list