Treat a query containing a single row as output(row)

Treat a row expression as output(row) for consistency with the way
datasets and expressions are handled.

Fixes #2201.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #2724 from ghalliday/issue1647

Fix scoping issues with #GETDATATYPE

Reviewed-By: Renato Golin <rengolin@hpccsystems.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Release some example regression test files

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Release more example regression tests

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #2730 from ghalliday/morexample

Release more example regression tests

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2729 from ghalliday/joinexample

Release some example regression test files

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2727 from ghalliday/issue2201

Treat a query containing a single row as output(row)

Reviewed-By: Renato Golin <rengolin@hpccsystems.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Introduce extra hash dedup helper functions

Introduce extra hash-dedup helper functions to enable thor to optimize
the implementation.  Also indicate whether the entire row is being
deduped - to avoid conversion to a key.

See Issue #2700.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge remote-tracking branch 'origin/candidate-3.8.x'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Add ESP support for JSON formatted responses

Refactors ESP message serialization code.  Encapsulates format
specific code. Adds support for JSON responses.

For now, desired format is specified in the request url by adding
an extension to the method name at the end of the path.

i.e. for XML:
http://host:8010/MyService/MyMethod.xml?Wuid=W20120621-123710

for JSON:
http://host:8010/MyService/MyMethod.json?Wuid=W20120621-123710

Fixes gh-2741.

Signed-off-by: Anthony Fishbeck <Anthony.Fishbeck@lexisnexis.com>
Provide a function for estimating allocated row capacity

For hash dedup if the dedup criteria are much smaller than the full row
then it is worth saving just the dedup fields.  However this may cause
extra work, may use more memory if the deduped rows are held in memory
(e.g., by a sort), or if there is little difference in the shrunk size.

To help this last criteria, this function allows thor to determine
whether or not removing some fields is likely to reduce the memory
usage.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
gh-2748 Minor memory leak

Some components, including standalone Roxie programs and possibly others,
have a one-off leak in getConfigurationDirectory. Other than creating
noise in memory leak reports this would have no other impact.

Fixes gh-2748.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Allow RIGHT ONLY joins against indexes

Previously JOIN(ds,index,condition,RIGHT ONLY); generated an error
because keyed joins didn't support right only joins.  It also meant
that in some situations (see examples) the error was missed, and an
invalid keyed join was generated.

This change allows that join to occur - but still generates an error
if KEYED() is used in the join condition, or as an attribute of the
join.

Addresses bugzilla #100824

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #2754 from ghalliday/bug100824

Allow RIGHT ONLY joins against indexes

Reviewed-By: Renato Golin <rengolin@hpccsystems.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2750 from richardkchapman/memleak-gh-2748

gh-2748 Minor memory leak

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Fix crash on linux generating a field usage report

The code was passing parameters field.getClear() and field->queryName(),
but the execution order isn't defined, leading to an invalid access of
field->

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
gh-2764 Core dumps possible if mix debug/release .so's

The unicodelib plugin compiled in debug mode can core if used with a jlib
compiled in release mode (and probably the reverse). This is caused by
the different definition of the Atom class in the two modes, which causes
chaos if inline calls to the constructor are made in both modes.

Modern debuggers are capable of displaying the value in an Atom without
the 'DbgReadable' field, so remove it.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
gh-2763 Fix valgrind error running compiler test suite

Make sure that log handler is cleared before closing the log file.

Fixes gh-2763.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2770 from richardkchapman/valgrind-gh2763

gh-2763 Fix valgrind error running compiler test suite

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Merge pull request #2769 from richardkchapman/atom-debug-gh2764

gh-2764 Core dumps possible if mix debug/release .so's

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>